mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 21:17:18 -04:00
Fixing method in users.js didn't have check userId
This commit is contained in:
parent
e3a727edec
commit
a37723f8a4
1 changed files with 1 additions and 0 deletions
|
@ -541,6 +541,7 @@ Users.mutations({
|
|||
Meteor.methods({
|
||||
setUsername(username, userId) {
|
||||
check(username, String);
|
||||
check(userId, String);
|
||||
const nUsersWithUsername = Users.find({ username }).count();
|
||||
if (nUsersWithUsername > 0) {
|
||||
throw new Meteor.Error('username-already-taken');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue