Skip to content

Commit

Permalink
Ignore Bot on Domain restriction (#19032)
Browse files Browse the repository at this point in the history
(cherry picked from commit b01707e)
  • Loading branch information
mohityadav766 committed Dec 12, 2024
1 parent 319c681 commit e28d0f9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,9 @@ public static void addDomainQueryParam(
SubjectContext subjectContext = getSubjectContext(securityContext);
// If the User is admin then no need to add domainId in the query param
// Also if there are domain restriction on the subject context via role
if (!subjectContext.isAdmin() && subjectContext.hasAnyRole(DOMAIN_ONLY_ACCESS_ROLE)) {
if (!subjectContext.isAdmin()
&& !subjectContext.isBot()
&& subjectContext.hasAnyRole(DOMAIN_ONLY_ACCESS_ROLE)) {
if (!nullOrEmpty(subjectContext.getUserDomains())) {
filter.addQueryParam(
"domainId", getCommaSeparatedIdsFromRefs(subjectContext.getUserDomains()));
Expand Down

0 comments on commit e28d0f9

Please sign in to comment.