Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into edge
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin-Rehr committed Oct 31, 2024
2 parents a242bd9 + 32da146 commit 4a1dd69
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions mig/server/editgdpuser.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ def usage(name='editgdpuser.py'):
account_state = None
reset_roles = False
user_dict = {}
# NOTE: Remove fields is NOT supported through 'editgdpuser',
# user 'edituser' to remove fields
remove_fields = []
opt_args = 'c:g:d:fhri:S:v'
try:
(opts, args) = getopt.getopt(args, opt_args)
Expand Down Expand Up @@ -171,6 +174,7 @@ def usage(name='editgdpuser.py'):
configuration,
user_id,
user_dict,
remove_fields,
conf_path,
mig_db_path,
gdp_db_path=gdp_db_path,
Expand Down
7 changes: 4 additions & 3 deletions mig/shared/gdp/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2146,6 +2146,7 @@ def edit_gdp_user(
configuration,
user_id,
changes,
removes,
conf_path,
mig_db_path,
gdp_db_path=None,
Expand Down Expand Up @@ -2371,7 +2372,7 @@ def edit_gdp_user(

try:
new_project_user = edit_user(project_user_id, new_changes,
conf_path, mig_db_path,
removes, conf_path, mig_db_path,
force, verbose)
new_project_user_id = new_project_user['distinguished_name']
new_user_ids.append(new_project_user_id)
Expand Down Expand Up @@ -2437,7 +2438,7 @@ def edit_gdp_user(

# Change main user in MiG user database and on filesystem

user = edit_user(user_id, new_changes,
user = edit_user(user_id, new_changes, removes,
conf_path, mig_db_path,
force, verbose)
new_user_id = user['distinguished_name']
Expand Down Expand Up @@ -2528,7 +2529,7 @@ def edit_gdp_user(
if verbose:
print(msg)
_logger.info(msg)
user = edit_user(rollback_id, rollback_dict,
user = edit_user(rollback_id, rollback_dict, [],
conf_path, mig_db_path,
True, verbose)
except Exception as exc:
Expand Down

0 comments on commit 4a1dd69

Please sign in to comment.