Add `dkit overwrites` to resolve permission overwrites
Maintainers usually reply within 1 day
@arin30 is already working on this.
Since Oct 21, 2026.
Assessment
This issue has not been assessed yet.
Description
This is the question that actually confuses people: the role says yes, the channel overwrite says no, and the member still cannot type. Discord resolves this with a documented algorithm that dkit could just run.
What to build
src/dkit/commands/overwrites.py that applies the documented order:
- Start from
@everyonerole permissions. - If
ADMINISTRATORis set, everything is allowed — stop. - Apply the
@everyonechannel overwrite: cleardeny, then setallow. - Union the member's role overwrites'
deny, then theirallow, and apply. - Apply the member-specific overwrite:
deny, thenallow.
Suggested interface:
dkit overwrites --base 274878286912 \
--everyone-deny SEND_MESSAGES \
--role-allow SEND_MESSAGES \
--member-deny ADD_REACTIONS
Output the effective permission set, and show each step so the user can see where a permission was lost.
Notes
The algorithm is in developers/topics/permissions.mdx ("Permission Overwrites") — follow it exactly rather than reasoning from first principles, and keep the step-by-step logic in a pure function so it is easy to test. FlagSet.value_of() parses each name list.
Please read CONTRIBUTING.md first.
Done when the worked example from the official docs is a test, each step is individually tested, and the ADMINISTRATOR short-circuit is covered.
- Dominant language
- Python
- Stars
- 1
- Forks
- 7
- Avg merge
- 5h 37m
- Merged PRs (30d)
- 31
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Bytewave1/dkit
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
test: fail when a file in `src/dkit/data/` is not registered in `DATASETS`Possibly taken A pull request linked to this issue is open or already merged. Opengood first issue testing
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
enhancement good first issue new command
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
enhancement good first issue new command
Difficulty 3/5 1-2 days Newbie friendliness 75/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
aws-samples/sample-per-model-bedrock#639 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 86/100
awslabs/visual-asset-management-system#937 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
project-codeflare/codeflare-sdk#1195 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
pandas-dev/pandas-stubs#2051 ·
Maintainers usually reply within 1 day