mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-14 04:29:21 +00:00
Minor: skip domain check for bots and admin (#18734)
This commit is contained in:
parent
532efbe5ab
commit
04659132b7
@ -84,7 +84,9 @@ public class PolicyEvaluator {
|
|||||||
@NonNull ResourceContextInterface resourceContext,
|
@NonNull ResourceContextInterface resourceContext,
|
||||||
OperationContext operationContext) {
|
OperationContext operationContext) {
|
||||||
// If the Resource Does not belong to any Domain, then evaluate via other permissions
|
// 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();
|
EntityReference domain = resourceContext.getDomain();
|
||||||
if (!subjectContext.hasDomain(domain)) {
|
if (!subjectContext.hasDomain(domain)) {
|
||||||
throw new AuthorizationException(
|
throw new AuthorizationException(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user