mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-20 06:58:18 +00:00
Ignore Bot on Domain restriction (#19032)
(cherry picked from commit b01707e54df153208a65f168244331d74513e1d6)
This commit is contained in:
parent
319c68189c
commit
e28d0f934a
@ -688,7 +688,9 @@ public final class EntityUtil {
|
|||||||
SubjectContext subjectContext = getSubjectContext(securityContext);
|
SubjectContext subjectContext = getSubjectContext(securityContext);
|
||||||
// If the User is admin then no need to add domainId in the query param
|
// 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
|
// 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())) {
|
if (!nullOrEmpty(subjectContext.getUserDomains())) {
|
||||||
filter.addQueryParam(
|
filter.addQueryParam(
|
||||||
"domainId", getCommaSeparatedIdsFromRefs(subjectContext.getUserDomains()));
|
"domainId", getCommaSeparatedIdsFromRefs(subjectContext.getUserDomains()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user