Skip to content

Commit

Permalink
openapi: change mkeventd and bi Perm to OkayToIgnorePerm for non even…
Browse files Browse the repository at this point in the history
…t_console and bi endpoints

Change-Id: I129cb29e07e53c3489cd6d6d3ae5832739bcd1af
  • Loading branch information
anthonyh209 committed Oct 19, 2023
1 parent 705cd53 commit 571162f
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions cmk/gui/openapi/endpoints/acknowledgement/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
permissions.AnyPerm(
[
permissions.Perm("general.see_all"),
permissions.Perm("bi.see_all"),
permissions.Perm("mkeventd.seeall"),
permissions.OkayToIgnorePerm("bi.see_all"),
permissions.OkayToIgnorePerm("mkeventd.seeall"),
permissions.Perm("wato.see_all_folders"),
]
)
Expand Down
4 changes: 2 additions & 2 deletions cmk/gui/openapi/endpoints/activate_changes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
permissions.AnyPerm(
[
permissions.Perm("general.see_all"),
permissions.Perm("bi.see_all"),
permissions.Perm("mkeventd.seeall"),
permissions.OkayToIgnorePerm("bi.see_all"),
permissions.OkayToIgnorePerm("mkeventd.seeall"),
]
),
)
Expand Down
2 changes: 1 addition & 1 deletion cmk/gui/openapi/endpoints/bi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class BIRuleEndpointSchema(BIRuleSchema):
[
permissions.Perm("bi.see_all"),
permissions.Perm("general.see_all"),
permissions.Perm("mkeventd.seeall"),
permissions.OkayToIgnorePerm("mkeventd.seeall"),
]
)
),
Expand Down
4 changes: 2 additions & 2 deletions cmk/gui/openapi/endpoints/comment/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
permissions.AnyPerm(
[
permissions.Perm("general.see_all"),
permissions.Perm("bi.see_all"),
permissions.Perm("mkeventd.seeall"),
permissions.OkayToIgnorePerm("bi.see_all"),
permissions.OkayToIgnorePerm("mkeventd.seeall"),
permissions.Undocumented(permissions.Perm("wato.see_all_folders")),
]
)
Expand Down
4 changes: 2 additions & 2 deletions cmk/gui/openapi/endpoints/downtime/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@
permissions.AnyPerm(
[
permissions.Perm("general.see_all"),
permissions.Perm("bi.see_all"),
permissions.Perm("mkeventd.seeall"),
permissions.OkayToIgnorePerm("bi.see_all"),
permissions.OkayToIgnorePerm("mkeventd.seeall"),
permissions.Perm("wato.see_all_folders"),
]
)
Expand Down
2 changes: 1 addition & 1 deletion cmk/gui/openapi/endpoints/event_console/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
[
permissions.Perm("mkeventd.seeall"),
permissions.Perm("general.see_all"),
permissions.Perm("bi.see_all"),
permissions.OkayToIgnorePerm("bi.see_all"),
]
)
)
Expand Down
4 changes: 2 additions & 2 deletions cmk/gui/openapi/endpoints/host/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ class SingleHostParameters(BaseSchema):
permissions.AnyPerm(
[
permissions.Perm("general.see_all"),
permissions.Perm("bi.see_all"),
permissions.Perm("mkeventd.seeall"),
permissions.OkayToIgnorePerm("bi.see_all"),
permissions.OkayToIgnorePerm("mkeventd.seeall"),
]
)
)
Expand Down
16 changes: 8 additions & 8 deletions cmk/gui/openapi/endpoints/host_config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@
permissions.Undocumented(
permissions.AnyPerm(
[
permissions.Perm("bi.see_all"),
permissions.OkayToIgnorePerm("bi.see_all"),
permissions.Perm("general.see_all"),
permissions.Perm("mkeventd.seeall"),
permissions.OkayToIgnorePerm("mkeventd.seeall"),
]
)
),
Expand All @@ -139,9 +139,9 @@
permissions.Undocumented(
permissions.AnyPerm(
[
permissions.Perm("bi.see_all"),
permissions.OkayToIgnorePerm("bi.see_all"),
permissions.Perm("general.see_all"),
permissions.Perm("mkeventd.seeall"),
permissions.OkayToIgnorePerm("mkeventd.seeall"),
]
)
),
Expand All @@ -156,9 +156,9 @@
permissions.Undocumented(
permissions.AnyPerm(
[
permissions.Perm("bi.see_all"),
permissions.OkayToIgnorePerm("bi.see_all"),
permissions.Perm("general.see_all"),
permissions.Perm("mkeventd.seeall"),
permissions.OkayToIgnorePerm("mkeventd.seeall"),
# only used to check if user can see a host
permissions.Perm("wato.see_all_folders"),
]
Expand All @@ -177,9 +177,9 @@ def with_access_check_permission(perm: permissions.BasePerm) -> permissions.Base
permissions.Undocumented(
permissions.AnyPerm(
[
permissions.Perm("bi.see_all"),
permissions.OkayToIgnorePerm("bi.see_all"),
permissions.Perm("general.see_all"),
permissions.Perm("mkeventd.seeall"),
permissions.OkayToIgnorePerm("mkeventd.seeall"),
# is only used to check if a user can see a host
permissions.Perm("wato.see_all_folders"),
],
Expand Down
4 changes: 2 additions & 2 deletions cmk/gui/openapi/endpoints/service/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
permissions.AnyPerm(
[
permissions.Perm("general.see_all"),
permissions.Perm("bi.see_all"),
permissions.Perm("mkeventd.seeall"),
permissions.OkayToIgnorePerm("bi.see_all"),
permissions.OkayToIgnorePerm("mkeventd.seeall"),
permissions.Perm("wato.see_all_folders"),
]
)
Expand Down

0 comments on commit 571162f

Please sign in to comment.