Details
Details
Made sure that it works for valid thread types, and that an error was thrown if a non-community ID was passed in
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
keyserver/src/creators/role-creator.js | ||
---|---|---|
92–96 ↗ | (On Diff #33284) | Can checkThreadPermission be rewritten to avoid fetching from the threads table twice? (We already need to fetch once in fetchThreadInfos below.) I think I asked you to do something similar in another diff recently, but in that case we had fetchServerThreadInfos instead of fetchThreadInfos. It should be a bit easier in this case, but let me know if you need pointers! |
92–110 ↗ | (On Diff #33284) | Can these two checks be performed simultaneously rather than sequentially? |
Comment Actions
Use threadHasPermission. Tested this by:
- Making sure users who should be able to create roles still can
- Allowed role creation for all users client-side, but kept this server check. When a regular member tried to create a role, hasPermission was false and an error was thrown