Skip to content

Commit f335d26

Browse files
committed
Fix bug where level permissions were not being checked if cmd perms were set
1 parent ccde7b0 commit f335d26

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ however, insignificant breaking changes do not guarantee a major version bump, s
1919
### Fixed
2020

2121
- Mentioned `competing` as an activity type. ([PR #2902](https://github.com/kyb3r/modmail/pull/2902))
22+
- Level permissions were not checked if command permissions were set.
2223

2324
### Internal
2425

core/checks.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ async def check_permissions(ctx, command_name) -> bool:
6161

6262
if command_name in command_permissions:
6363
# -1 is for @everyone
64-
return -1 in command_permissions[command_name] or any(
64+
if -1 in command_permissions[command_name] or any(
6565
str(check.id) in command_permissions[command_name] for check in checkables
66-
)
66+
):
67+
return True
6768

6869
level_permissions = ctx.bot.config["level_permissions"]
6970

0 commit comments

Comments
 (0)