mirror of
https://github.com/wekan/wekan.git
synced 2025-12-26 12:18:49 +01:00
Add the ability for the admin :
- disabling a login for a user (not himself) - enabling a login for a user - transfering the ownership of all user's boards to himself
This commit is contained in:
parent
3ab33ed826
commit
77d23df87f
3 changed files with 53 additions and 1 deletions
|
|
@ -298,6 +298,15 @@ Boards.mutations({
|
|||
return { $pull: { labels: { _id: labelId } } };
|
||||
},
|
||||
|
||||
changeOwnership(fromId, toId) {
|
||||
const memberIndex = this.memberIndex(fromId);
|
||||
return {
|
||||
$set: {
|
||||
[`members.${memberIndex}.userId`]: toId,
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
addMember(memberId) {
|
||||
const memberIndex = this.memberIndex(memberId);
|
||||
if (memberIndex >= 0) {
|
||||
|
|
@ -565,7 +574,7 @@ if (Meteor.isServer) {
|
|||
|
||||
const data = Boards.find({
|
||||
archived: false,
|
||||
'members.userId': req.userId,
|
||||
'members.userId': paramUserId,
|
||||
}, {
|
||||
sort: ['title'],
|
||||
}).map(function(board) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue