Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Role Restrictions for Commands (Assignments) #8

Open
unseenmagik opened this issue Jan 31, 2022 · 0 comments
Open

Role Restrictions for Commands (Assignments) #8

unseenmagik opened this issue Jan 31, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@unseenmagik
Copy link
Contributor

If you wanted to allow a certain discord role from a guild to be able to issue commands to rescan.
Only allow certain discord roles, the ability to reQuest only specfic assignment groups ?

Example: If assignment name = xyz, allow role 12345 to issue the command
Thus, If assignment name = xyz, role 0987665 can not issue the command

Or to display only certain assignments based on a role for the user issuing the command, like a role/guild check before response?

As discussed:
For now I use only one restriction based on roles who can fire commands. For the thing you need you might have to create additional layer of security for commands. I would go with advanced_permissions or something where you could specify that role_id is allowed to use specified commands and list only specified assignments from them.
For example:

{
    "instance": {
        "discord": {
            "enabled_roles": [1234, 2345],
            "advanced_permissions": [
                {"role_id": "2345", "enabled_methods": ["status", ...], "allowed_assignmentgroups": ["quests_one", ...]},
            ]
        }
    }
}
@lenisko lenisko added the enhancement New feature or request label Feb 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants