Skip to content

Commit

Permalink
Minor: skip domain check for bots and admin (#18734)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshach committed Nov 22, 2024
1 parent 840c976 commit 7f65ea0
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,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 7f65ea0

Please sign in to comment.