mirror of
https://github.com/wekan/wekan.git
synced 2025-12-28 21:28: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
|
|
@ -143,7 +143,32 @@ if (Meteor.isServer) {
|
|||
}
|
||||
}
|
||||
},
|
||||
setCreateOrgFromOidc(
|
||||
orgDisplayName,
|
||||
orgDesc,
|
||||
orgShortName,
|
||||
orgWebsite,
|
||||
orgIsActive,
|
||||
) {
|
||||
check(orgDisplayName, String);
|
||||
check(orgDesc, String);
|
||||
check(orgShortName, String);
|
||||
check(orgWebsite, String);
|
||||
check(orgIsActive, Boolean);
|
||||
|
||||
const nOrgNames = Org.find({ orgShortName }).count();
|
||||
if (nOrgNames > 0) {
|
||||
throw new Meteor.Error('orgname-already-taken');
|
||||
} else {
|
||||
Org.insert({
|
||||
orgDisplayName,
|
||||
orgDesc,
|
||||
orgShortName,
|
||||
orgWebsite,
|
||||
orgIsActive,
|
||||
});
|
||||
}
|
||||
},
|
||||
setOrgDisplayName(org, orgDisplayName) {
|
||||
if (Meteor.user() && Meteor.user().isAdmin) {
|
||||
check(org, Object);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue