Skip to content

Commit

Permalink
additional logging for permissions on statements
Browse files Browse the repository at this point in the history
  • Loading branch information
peacekeeper committed Jun 4, 2014
1 parent f228c9c commit df19d1b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -416,12 +416,16 @@ private static boolean decideLinkContractPermission(XDI3Segment permissionXri, X
linkContract.hasPermissionTargetStatement(permissionXri, statementXri) ||
linkContract.hasPermissionTargetStatement(XDILinkContractConstants.XRI_S_ALL, statementXri);

if (log.isDebugEnabled()) log.debug("Link contract " + linkContract + " allows " + permissionXri + " on " + statementXri);

// check negative permissions for the target statement

boolean negativePermission =
linkContract.hasNegativePermissionTargetStatement(permissionXri, statementXri) ||
linkContract.hasNegativePermissionTargetStatement(XDILinkContractConstants.XRI_S_ALL, statementXri);

if (log.isDebugEnabled()) log.debug("Link contract " + linkContract + " does not allow " + permissionXri + " on " + statementXri);

// decide

boolean decision = positivePermission && ! negativePermission;
Expand Down

0 comments on commit df19d1b

Please sign in to comment.