Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve knowing when first user is being created or edited #319

Merged
merged 3 commits into from
Jul 19, 2021

Conversation

dgdavid
Copy link
Member

@dgdavid dgdavid commented Jul 16, 2021

Problem

Reported bsc#1188068 has revealed that InstUserFirstDialog is using a not optimal way to know if the user is going to be created or edited (see comment#12). In fact, changes introduced at yast/yast-firstboot#126 broken it in a way that init_pw_for_root starts failing.

Solution

To use the Y2Users::ConfigElement#attached? method instead of relying on the password value, which looks prone to false positives.

However, the check has to be performed and stored at the time to initialize the dialog because the private InstUserFirsDialogt#user method attaches the user to the current configuration for validation purposes.

Tests

  • Already unit tests still passing
  • Manual tests: done via driver update in a TW installation. Everything seems work as expected.

@coveralls
Copy link

coveralls commented Jul 16, 2021

Pull Request Test Coverage Report for Build 1044443450

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 53.511%

Totals Coverage Status
Change from base Build 1033637596: 0.01%
Covered Lines: 2576
Relevant Lines: 4814

💛 - Coveralls

Because use the password presence is prone to false positives.
@dgdavid dgdavid changed the title Bsc 1188068 c12 Improve knowing when first user is being created or edited Jul 16, 2021
@joseivanlopez
Copy link
Contributor

Looks good.

@dgdavid dgdavid marked this pull request as ready for review July 17, 2021 00:12
Copy link
Contributor

@joseivanlopez joseivanlopez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

package/yast2-users.changes Outdated Show resolved Hide resolved
@dgdavid dgdavid merged commit 41b839d into master Jul 19, 2021
@dgdavid dgdavid deleted the bsc-1188068-c12 branch July 19, 2021 08:28
@yast-bot
Copy link
Contributor

✔️ Internal Jenkins job #23 successfully finished
✔️ Created IBS submit request #245326

@yast-bot
Copy link
Contributor

✔️ Public Jenkins job #61 successfully finished
✔️ Created OBS submit request #907085

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants