Skip to content

Commit

Permalink
Ignore Bot on Domain restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
mohityadav766 committed Dec 12, 2024
1 parent 2a22fda commit 00b6cd0
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,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 00b6cd0

Please sign in to comment.