mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
BoardAdmin and Admin can now set board background image URL.
Thanks to xet7 ! Related #486
This commit is contained in:
parent
8b4193149b
commit
49ef80ab6c
6 changed files with 80 additions and 1 deletions
|
|
@ -294,6 +294,13 @@ Boards.attachSchema(
|
|||
}
|
||||
},
|
||||
},
|
||||
backgroundImageURL: {
|
||||
/**
|
||||
* The background image URL of the board.
|
||||
*/
|
||||
type: String,
|
||||
optional: true,
|
||||
},
|
||||
allowsCardCounterList: {
|
||||
/**
|
||||
* Show card counter per list
|
||||
|
|
@ -1266,6 +1273,16 @@ Boards.mutations({
|
|||
return { $set: { color } };
|
||||
},
|
||||
|
||||
setBackgroundImageURL(backgroundImageURL) {
|
||||
if(Meteor.user().isBoardAdmin()) {
|
||||
return { $set: { backgroundImageURL } };
|
||||
} else if (Meteor.user().isAdmin()) {
|
||||
return { $set: { backgroundImageURL } };
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
setVisibility(visibility) {
|
||||
return { $set: { permission: visibility } };
|
||||
},
|
||||
|
|
@ -1637,6 +1654,10 @@ if (Meteor.isServer) {
|
|||
});
|
||||
|
||||
Meteor.methods({
|
||||
getBackgroundImageURL(boardId) {
|
||||
check(boardId, String);
|
||||
return Boards.findOne({ boardId: boardId }, {}, { backgroundImageUrl: 1 });
|
||||
},
|
||||
quitBoard(boardId) {
|
||||
check(boardId, String);
|
||||
const board = Boards.findOne(boardId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue