mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01: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({
|
Meteor.methods({
|
||||||
setUsername(username, userId) {
|
setUsername(username, userId) {
|
||||||
check(username, String);
|
check(username, String);
|
||||||
|
check(userId, String);
|
||||||
const nUsersWithUsername = Users.find({ username }).count();
|
const nUsersWithUsername = Users.find({ username }).count();
|
||||||
if (nUsersWithUsername > 0) {
|
if (nUsersWithUsername > 0) {
|
||||||
throw new Meteor.Error('username-already-taken');
|
throw new Meteor.Error('username-already-taken');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue