mirror of
https://github.com/wekan/wekan.git
synced 2025-12-18 00:10:13 +01:00
be sure user isAdmin
This commit is contained in:
parent
b876098dc4
commit
349925ad6b
1 changed files with 30 additions and 26 deletions
|
|
@ -1302,6 +1302,7 @@ if (Meteor.isServer) {
|
|||
setUsersTeamsTeamDisplayName(teamId, teamDisplayName) {
|
||||
check(teamId, String);
|
||||
check(teamDisplayName, String);
|
||||
if (Meteor.user() && Meteor.user().isAdmin) {
|
||||
Users.find({
|
||||
teams: {
|
||||
$elemMatch: {teamId: teamId}
|
||||
|
|
@ -1318,10 +1319,12 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
setUsersOrgsOrgDisplayName(orgId, orgDisplayName) {
|
||||
check(orgId, String);
|
||||
check(orgDisplayName, String);
|
||||
if (Meteor.user() && Meteor.user().isAdmin) {
|
||||
Users.find({
|
||||
orgs: {
|
||||
$elemMatch: {orgId: orgId}
|
||||
|
|
@ -1338,6 +1341,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
Accounts.onCreateUser((options, user) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue