RocketChat / RocketChat/Rocket.Chat
Timeout when editing user info
@brunosquadros is already working on this.
Since Dec 19, 2019.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
There are three methods that throw a one minute timeout when trying to edit some user information.
All three are timing out via rest api calls, and setUsername also times out in admin web interface.
There is a check for the timeout function that, in my understanding, should not trigger the timeout if the user who makes the editing has 'edit-other-user-info' privilege, which doesn't seem to work.
I assume it probably has something to do with RocketChat.authz.hasPermission() function/alias, because, for one, I can't access it from browser console.
Operations that result in timeout are:
change name - packages/rocketchat-lib/server/functions/setRealName.js
change email - packages/rocketchat-lib/server/functions/setEmail.js
Here the check is realized like this:
{ 0() { return !Meteor.userId() || !RocketChat.authz.hasPermission(Meteor.userId(), 'edit-other-user-info'); }
change username - packages/rocketchat-lib/server/functions/setUsername.js
In this one the check slightly differs:
{ [0](userId) { return !userId || !RocketChat.authz.hasPermission(userId, 'edit-other-user-info'); }
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.