Skip to content

Commit f74588a

Browse files
authored
Merge pull request #750 from uw-it-aca/task/authoritative-msca-delegation
early error message
2 parents 814ab0c + 8af9fb6 commit f74588a

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

endorsement/reconcile_access.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,14 @@ def reconcile_access(commit_changes=False):
118118

119119
# access records for which no delegation was reported
120120
for record in AccessRecord.objects.filter(id__in=record_ids):
121-
logger.info(f"UNREPORTED DELEGATION: mailbox {accessee.netid} "
121+
logger.info(f"UNREPORTED DELEGATION: mailbox {record.accessee.netid} "
122122
f"delegate {record.accessor.name} "
123123
f"({record.access_right.name}) "
124124
f"on {record.datetime_granted} not "
125125
"assigned in Outlook")
126126
# disable until policy is decided
127127
if False and commit_changes:
128-
assign_delegation(accessee, record)
128+
assign_delegation(record.accessee, record)
129129

130130

131131
def clear_record_id(record_ids, record_id):
@@ -256,13 +256,7 @@ def save_conflict_record(accessee, record, delegate, rights):
256256
def mailbox_delegations(column):
257257
rights = json.loads(column)
258258
for right in [rights] if isinstance(rights, dict) else rights:
259-
user = right["User"]
260-
if user and user.lower() != 'null':
261-
yield user, right['AccessRights']
262-
else:
263-
logger.debug(
264-
f"NULL RIGHT: mailbox {netid} delegate {delegate}"
265-
f" right: {right}")
259+
yield right["User"], right['AccessRights']
266260

267261

268262
def access_user(a):

0 commit comments

Comments
 (0)