Hello everybody.
I’m having a problem, and even updating rocketchat the problem continues.
When creating a new permission rule, when adding the user, the rule does not work, and when trying to access the rule to delete it gives an error as attached (INVALID RULE)
Server Setup Information
Version of Rocket.Chat Server: 4.3.1
Operating System: Ubuntu
Deployment Method:
Number of Running Instances: 1
DB Replicaset Oplog:
NodeJS Version: 12.22.1
MongoDB Version: 4.0.27
Proxy:
Firewalls involved: no
Any additional Information
Hi! Welcome to our forums
There is an open issue for that. You can also see the discussion for the fix going on:
opened 08:41PM - 19 Dec 21 UTC
stat: need more info
good first issue
bug
<!--
Please see our guide for opening issues: https://rocket.chat/docs/contr… ibuting/reporting-issues
If you have questions or are looking for help/support please see: https://rocket.chat/docs/getting-support
If you are experiencing a bug please search our issues to be sure it is not already present: https://github.com/RocketChat/Rocket.Chat/issues
-->
### Description:
Permissions page allow to created invalid roles and does not allow to edit/delete these roles, as well as they cannot be assigned using API.
### Steps to reproduce:
1. go to /admin/permissions and click plus at top right
2. enter desired role name and description, for example "test123", use Global scope and click save
3. Try to assign this role: this gives the following error:
Client error: `POST https://chat.cryptomates.io//api/v1/users.update` resulted in a `400 Bad Request` response:
{"success":false,"error":"The field Roles consist invalid role name [error-action-not-allowed]","errorType":"error-actio (truncated...)
4. try to edit/delete this role, by clicking on role name
It shows "Invalid role"
### Expected behavior:
Role with wrong names should not be allowed to create and anyway they should have a possibility to be deleted
### Actual behavior:

### Server Setup Information:
- Version of Rocket.Chat Server:
- Operating System: Ubuntu 20
- Deployment Method: regular install
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version: 6.14.6
- MongoDB Version: 4.4.10
### Client Setup Information
- Desktop App or Browser Version: Chrome 86
- Operating System: Windows 10