mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Include to Wekan packages directory contents, so that meteor command would build all directly.
This also simplifies build scripts. Thanks to xet7 !
This commit is contained in:
parent
6117097a93
commit
73e265d8fd
354 changed files with 36977 additions and 106 deletions
25
packages/meteor-useraccounts-core/lib/methods.js
Normal file
25
packages/meteor-useraccounts-core/lib/methods.js
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/* global
|
||||
AccountsTemplates: false
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
Meteor.methods({
|
||||
ATRemoveService: function(serviceName) {
|
||||
check(serviceName, String);
|
||||
|
||||
var userId = this.userId;
|
||||
|
||||
if (userId) {
|
||||
var user = Meteor.users.findOne(userId);
|
||||
var numServices = _.keys(user.services).length; // including "resume"
|
||||
var unset = {};
|
||||
|
||||
if (numServices === 2) {
|
||||
throw new Meteor.Error(403, AccountsTemplates.texts.errors.cannotRemoveService, {});
|
||||
}
|
||||
|
||||
unset["services." + serviceName] = "";
|
||||
Meteor.users.update(userId, {$unset: unset});
|
||||
}
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue