Skip to content

Commit

Permalink
Bug fix for : Admin Users must be able to access all monitors opensea…
Browse files Browse the repository at this point in the history
…rch-project#139 (opensearch-project#280)

Signed-off-by: Sriram <59816283+skkosuri-amzn@users.noreply.github.com>
  • Loading branch information
skkosuri-amzn authored and lezzago committed Mar 9, 2022
1 parent cccbe4d commit fd6c8f3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ interface SecureTransportAction {
)
)
return false
} else if (isAdmin(user)) {
return true
} else if (user.backendRoles.isNullOrEmpty()) {
actionListener.onFailure(
AlertingException.wrap(
Expand All @@ -112,7 +114,7 @@ interface SecureTransportAction {
resourceId: String
): Boolean {

if (!filterByEnabled) return true
if (!doFilterForUser(requesterUser)) return true

val resourceBackendRoles = resourceUser?.backendRoles
val requesterBackendRoles = requesterUser?.backendRoles
Expand Down

0 comments on commit fd6c8f3

Please sign in to comment.