mirror of
https://github.com/wekan/wekan.git
synced 2026-01-20 00:06:09 +01:00
Fix New Board Permissions: NormalAssignedOnly, CommentAssignedOnly, ReadOnly, ReadAssignedOnly. Part 1.
Thanks to nazim-oss and xet7 ! Related #6060
This commit is contained in:
parent
2f59e42024
commit
eabb6a239d
25 changed files with 562 additions and 291 deletions
|
|
@ -271,6 +271,13 @@ Users.attachSchema(
|
|||
type: Boolean,
|
||||
optional: true,
|
||||
},
|
||||
'profile.showActivities': {
|
||||
/**
|
||||
* does the user want to show activities in card details?
|
||||
*/
|
||||
type: Boolean,
|
||||
optional: true,
|
||||
},
|
||||
'profile.customFieldsGrid': {
|
||||
/**
|
||||
* has user at card Custom Fields have Grid (false) or one per row (true) layout?
|
||||
|
|
@ -875,6 +882,16 @@ if (Meteor.isClient) {
|
|||
return board && board.hasCommentOnly(this._id);
|
||||
},
|
||||
|
||||
isReadOnly() {
|
||||
const board = Utils.getCurrentBoard();
|
||||
return board && board.hasReadOnly(this._id);
|
||||
},
|
||||
|
||||
isReadAssignedOnly() {
|
||||
const board = Utils.getCurrentBoard();
|
||||
return board && board.hasReadAssignedOnly(this._id);
|
||||
},
|
||||
|
||||
isNotWorker() {
|
||||
const board = Utils.getCurrentBoard();
|
||||
return board && board.hasMember(this._id) && !board.hasWorker(this._id);
|
||||
|
|
@ -1206,6 +1223,11 @@ Users.helpers({
|
|||
return profile.cardMaximized || false;
|
||||
},
|
||||
|
||||
hasShowActivities() {
|
||||
const profile = this.profile || {};
|
||||
return profile.showActivities || false;
|
||||
},
|
||||
|
||||
hasHiddenMinicardLabelText() {
|
||||
const profile = this.profile || {};
|
||||
return profile.hiddenMinicardLabelText || false;
|
||||
|
|
@ -1753,6 +1775,14 @@ Users.mutations({
|
|||
};
|
||||
},
|
||||
|
||||
toggleShowActivities(value = false) {
|
||||
return {
|
||||
$set: {
|
||||
'profile.showActivities': !value,
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
toggleLabelText(value = false) {
|
||||
return {
|
||||
$set: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue