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

Add support for is_admin in RHEL 10 #45

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import logging
logger = logging.getLogger('anabot')

from anabot.conditions import is_distro_version, has_feature_hub_config
from anabot.conditions import is_distro_version, has_feature_hub_config, is_anaconda_version_ge
from anabot.runtime.decorators import handle_action, handle_check, check_action_result
from anabot.runtime.default import default_handler
from anabot.runtime.functions import get_attr, getnode, TimeoutError, getparent, getsibling, handle_checkbox, check_checkbox, clear_text
Expand Down Expand Up @@ -38,6 +38,13 @@
'make_admin': '_Make this user administrator',
'require_password': '_Require a password to use this account',
})
# The checkbox in RHEL 10 has a different annotation, so we need to update the string,
# this anaconda version covers both RHEL10 and affected fedora versions
if is_anaconda_version_ge('35.22.1'):
strings.update({
'make_admin': 'Add administrative privileges to this user account (wheel group membership)',
})


@handle_act_hub('')
@handle_act('')
Expand Down
Loading