Skip to content

Commit a26cd4e

Browse files
committed
v3.3.2, fix perm bug
1 parent de92221 commit a26cd4e

File tree

5 files changed

+25
-8
lines changed

5 files changed

+25
-8
lines changed

.github/workflows/lints.yml

+13-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
name: Modmail Workflow
22

3-
on: [push, pull_request, pull_request_review]
3+
on: [push, pull_request]
44

55
jobs:
66
code-style:
7-
runs-on: ${{ matrix.os }}
7+
8+
# runs-on: ${{ matrix.os }}
9+
# strategy:
10+
# fail-fast: false
11+
# matrix:
12+
# os: [ubuntu-latest, windows-latest, macOS-latest]
13+
# python-version: [3.6, 3.7]
14+
15+
runs-on: ubuntu-latest
816
strategy:
917
fail-fast: false
1018
matrix:
11-
os: [ubuntu-latest, windows-latest, macOS-latest]
1219
python-version: [3.6, 3.7]
1320

1421
steps:
@@ -26,7 +33,8 @@ jobs:
2633
run: bandit ./bot.py cogs/*.py core/*.py -b .bandit_baseline.json
2734
- name: Pylint
2835
run: pylint ./bot.py cogs/*.py core/*.py --disable=import-error --exit-zero -r y
29-
- name: Flake8 and black lint
36+
continue-on-error: true
37+
- name: Black and flake8
3038
run: |
31-
flake8 ./bot.py cogs/*.py core/*.py --ignore=E501,E203,W503
3239
black . --check
40+
flake8 ./bot.py cogs/*.py core/*.py --ignore=E501,E203,W503

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ celerybeat-schedule
9393
.venv
9494
env/
9595
venv/
96+
venv2/
9697
ENV/
9798
env.bak/
9899
venv.bak/
@@ -134,4 +135,5 @@ plugins/
134135
!plugins/registry.json
135136
temp/
136137
test.py
137-
stack.yml
138+
stack.yml
139+
.github/workflows/build_docker.yml

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ This project mostly adheres to [Semantic Versioning](https://semver.org/spec/v2.
77
however, insignificant breaking changes does not guarantee a major version bump, see the reasoning [here](https://github.com/kyb3r/modmail/issues/319).
88

99

10+
# v3.3.2
11+
12+
### Fixed
13+
14+
- An oversight with the permission system.
15+
1016
# v3.3.1
1117

1218
### Emergency Patch

bot.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "3.3.1"
1+
__version__ = "3.3.2"
22

33
import asyncio
44
import logging

core/checks.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ async def check_permissions(ctx, command_name) -> bool:
5252
if (
5353
permission_level is not PermissionLevel.OWNER
5454
and ctx.channel.permissions_for(ctx.author).administrator
55+
and ctx.guild == ctx.bot.modmail_guild
5556
):
56-
# Administrators have permission to all non-owner commands
57+
# Administrators have permission to all non-owner commands in the Modmail Guild
5758
logger.debug("Allowed due to administrator.")
5859
return True
5960

0 commit comments

Comments
 (0)