theADAMJR / acrd.app

Chat app like old-style Discord, with custom themes and more.
https://acrd.app/
Mozilla Public License 2.0
246 stars 111 forks source link

Missing Permissions - MANAGE_ROLES #23

Closed DavidCavallaro closed 3 years ago

DavidCavallaro commented 3 years ago

Describe the bug It is not possible to create or modify roles despite having the "MANAGE_ROLES" permission.

To Reproduce Steps to reproduce the behavior:

  1. Grant the "MANAGE_ROLES" permission to a certain role
  2. Give that role to a user
  3. Go to that user on the server roles page
  4. Press "Create" or modify a permission of any role below the one it owns.

Expected behavior With this permission it should be possible to edit or add roles to the guild.

Screenshots

Schermata 2021-10-04 alle 15 32 00

Desktop (please complete the following information):

theADAMJR commented 3 years ago

Thank you David. Also, another feature to add: roles that are higher than the user's highest role should be disabled (it currently should just give an error on the server). I'll look into this soon.

DavidCavallaro commented 3 years ago

That was implied! good job! I will continue the hunt :)

theADAMJR commented 3 years ago

Deployed a new update to test and fix role management. It ensures that role managers can edit their own role or lower roles, unless they are the owner - then they can edit anything. image

Let me know if you still see this bug.

DavidCavallaro commented 3 years ago

Here! The function you described works correctly but wouldn't it be better and safer to block the modification of your role and only keep the possibility to make changes to the underlying roles?

theADAMJR commented 3 years ago

I was thinking of that but for some reason I forgot how Discord worked and thought that's how they did it. I guess I was thinking: Do what Discord did first, and logic second. image

Added a similar feature for member management with backend validation. image