Skip to content

Commit

Permalink
YDA-5487: Notification to rodsadmin package submit
Browse files Browse the repository at this point in the history
  • Loading branch information
claravox authored and lwesterhof committed Nov 10, 2023
1 parent 487cfce commit 25e7e70
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
31 changes: 14 additions & 17 deletions uuGroupPolicies.r
Original file line number Diff line number Diff line change
Expand Up @@ -397,23 +397,20 @@ uuGroupPreSudoObjMetaRemove(*objName, *objType, *wildcards, *attribute, *value,
uuUserPreSudoObjMetaSet(*objName, *objType, *attribute, *value, *unit, *policyKv) {

if (*objType == "-u") {
uuGetUserType(*objName, *targetUserType);
if (*targetUserType == "rodsuser") {
if (*unit != "") {
# We do not use / allow the unit field here.
fail;
}
if (*value == "") {
# Empty metadata values trigger iRODS bugs.
# If a field is allowed to be empty (currently only
# 'description', it should be set to '.' instead.
# This should of course be hidden by query functions.
fail;
}
uuUserPolicyCanUserModify(uuClientFullName, *objName, *attribute, *allowed, *reason);
if (*allowed == 1) {
succeed;
}
if (*unit != "") {
# We do not use / allow the unit field here.
fail;
}
if (*value == "") {
# Empty metadata values trigger iRODS bugs.
# If a field is allowed to be empty (currently only
# 'description', it should be set to '.' instead.
# This should of course be hidden by query functions.
fail;
}
uuUserPolicyCanUserModify(uuClientFullName, *objName, *attribute, *allowed, *reason);
if (*allowed == 1) {
succeed;
}
}
fail;
Expand Down
2 changes: 1 addition & 1 deletion uuGroupPolicyChecks.r
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,6 @@ uuUserPolicyCanUserModify(*actor, *userName, *attribute, *allowed, *reason) {
} else if (trimr(*attribute, "_") == "org_notification") {
*allowed = 1;
} else {
*reason = "Invalid user attribute name.";
*reason = "Invalid user attribute name.";
}
}

0 comments on commit 25e7e70

Please sign in to comment.