mirror of
https://github.com/wekan/wekan.git
synced 2026-02-06 16:41:48 +01:00
Board: When removing member from board, remove also from assignees.
Admin Panel/People: 1) Allow edit user that does not have email address. 2) When creating new user, require username and email address, and save also fullname. 3) Some in progress code for deleting user, that does not work correctly yet, so deleting user is not enabled yet. Thanks to airtraxx and xet7. Related #3396
This commit is contained in:
parent
775f0d9fe6
commit
61ae62a83a
4 changed files with 115 additions and 17 deletions
|
|
@ -255,11 +255,15 @@ Template.memberPopup.events({
|
|||
},
|
||||
'click .js-change-role': Popup.open('changePermissions'),
|
||||
'click .js-remove-member': Popup.afterConfirm('removeMember', function() {
|
||||
// This works from removing member from board, card members and assignees.
|
||||
const boardId = Session.get('currentBoard');
|
||||
const memberId = this.userId;
|
||||
Cards.find({ boardId, members: memberId }).forEach(card => {
|
||||
card.unassignMember(memberId);
|
||||
});
|
||||
Cards.find({ boardId, assignees: memberId }).forEach(card => {
|
||||
card.unassignAssignee(memberId);
|
||||
});
|
||||
Boards.findOne(boardId).removeMember(memberId);
|
||||
Popup.close();
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue