Skip to content

Commit

Permalink
Add support for is_admin in RHEL 10
Browse files Browse the repository at this point in the history
  • Loading branch information
You-never-know authored and jstodola committed Mar 11, 2024
1 parent 11f57ad commit ab7c93b
Showing 1 changed file with 8 additions and 1 deletion.
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

0 comments on commit ab7c93b

Please sign in to comment.