Skip to content

Commit

Permalink
Merge pull request google#121 from pidydx/AccessControl
Browse files Browse the repository at this point in the history
Added reason to access logging
  • Loading branch information
scudette committed Feb 23, 2015
2 parents 4ce8700 + 64357eb commit e81bf2b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/aff4_objects/user_managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,11 @@ def CheckAccess(self, subject, token):
require(subject, token, *require_args, **require_kwargs)

logging.debug("Datastore access granted to %s on %s by pattern: %s "
"(require=%s, require_args=%s, require_kwargs=%s, "
"helper_name=%s)",
"with reason: %s (require=%s, require_args=%s, "
"require_kwargs=%s, helper_name=%s)",
utils.SmartStr(token.username), subject_str, regex_text,
require, require_args, require_kwargs, self.helper_name)
utils.SmartStr(token.reason), require, require_args,
require_kwargs, self.helper_name)
return True

logging.warn("Datastore access denied to %s (no matched rules)",
Expand Down

0 comments on commit e81bf2b

Please sign in to comment.