Closed svemat01 closed 1 year ago
Will start implementing this after I've got the current frontend changes in a mostly stable state to build off of. Hopefully will be able to make it into the next release.
For my future reference:
It looks like adding the
guilds.members.read
scope will allows us to use the /users/@me/guilds/{guild.id}
endpoint to retrieve the roles the user has and match them against the allowed roles.
Just pushed an initial implementation of this to the develop branch (if you decide to test this, be aware that develop currently has a substantial number of changes awaiting v0.6.0). There are some quirks to document about the implementation of this feature that users should be aware of:
The user's Discord Roles are stored within their auth token.
MODMAIL_VIEWER_DISCORD_GUILD_ID
))The user's highest modmail role should always be used based on both discord roles and manually assigned roles.
Discord role permissions are synced with your MongoDB database
Could you move or add the abillity to check role/user whitelist on the ?oauth
command of modmail.
It is patreon only but the bot still saves the whitelist in the db so this could be used instead of the modmail perm levels. Or make us choose what whiltelists we would like to use maybe?
Could you move or add the abillity to check role/user whitelist on the
?oauth
command of modmail. It is patreon only but the bot still saves the whitelist in the db so this could be used instead of the modmail perm levels. Or make us choose what whiltelists we would like to use maybe?
Hey @martinbndr, this is out of scope for this issue (and it's now closed), could you make a new issue for this?
Add support for checking if a user is part of any Discord role ids that are set as Modmail Roles (Supporter, Adminstrator etc...)