mirror of
https://github.com/wekan/wekan.git
synced 2025-12-31 06:38:49 +01:00
add README and functionality for more control through oidc - create teams/orgs if not exist and addto user - make user admin when flag is set
This commit is contained in:
parent
5b60efbe82
commit
a0dbfa1f7e
5 changed files with 234 additions and 47 deletions
|
|
@ -141,7 +141,31 @@ if (Meteor.isServer) {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
setCreateTeamFromOidc(
|
||||
teamDisplayName,
|
||||
teamDesc,
|
||||
teamShortName,
|
||||
teamWebsite,
|
||||
teamIsActive,
|
||||
) {
|
||||
check(teamDisplayName, String);
|
||||
check(teamDesc, String);
|
||||
check(teamShortName, String);
|
||||
check(teamWebsite, String);
|
||||
check(teamIsActive, Boolean);
|
||||
const nTeamNames = Team.find({ teamShortName }).count();
|
||||
if (nTeamNames > 0) {
|
||||
throw new Meteor.Error('teamname-already-taken');
|
||||
} else {
|
||||
Team.insert({
|
||||
teamDisplayName,
|
||||
teamDesc,
|
||||
teamShortName,
|
||||
teamWebsite,
|
||||
teamIsActive,
|
||||
});
|
||||
}
|
||||
},
|
||||
setTeamDisplayName(team, teamDisplayName) {
|
||||
if (Meteor.user() && Meteor.user().isAdmin) {
|
||||
check(team, Object);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue