Skip to content

Commit

Permalink
Minor: skip domain check for bots and admin
Browse files Browse the repository at this point in the history
  • Loading branch information
harshach committed Nov 22, 2024
1 parent 17ffdf9 commit 8c949b7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ public static void hasDomainPermission(
@NonNull ResourceContextInterface resourceContext,
OperationContext operationContext) {
// If the Resource Does not belong to any Domain, then evaluate via other permissions
if (!nullOrEmpty(resourceContext.getDomain())) {
if (!nullOrEmpty(resourceContext.getDomain())
&& !subjectContext.isAdmin()
&& !subjectContext.isBot()) {
EntityReference domain = resourceContext.getDomain();
if (!subjectContext.hasDomain(domain)) {
throw new AuthorizationException(
Expand Down

0 comments on commit 8c949b7

Please sign in to comment.