mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-31 04:32:06 +08:00
Merge pull request #3094 from urbanrotnik/ur-sci-5415-wrong-permissions
Fix permissions check for cards [SCI-5415]
This commit is contained in:
commit
6e488d8595
1 changed files with 10 additions and 1 deletions
|
@ -283,9 +283,18 @@
|
|||
}
|
||||
|
||||
function checkActionPermission(permission) {
|
||||
return selectedProjects.every(function(projectId) {
|
||||
let allProjects;
|
||||
let allFolders;
|
||||
|
||||
allProjects = selectedProjects.every(function(projectId) {
|
||||
return $(`.project-card[data-id="${projectId}"]`).data(permission);
|
||||
});
|
||||
|
||||
allFolders = selectedProjectFolders.every(function(projectFolderId) {
|
||||
return $(`.folder-card[data-id="${projectFolderId}"]`).data(permission);
|
||||
});
|
||||
|
||||
return allProjects && allFolders;
|
||||
}
|
||||
|
||||
function updateProjectsToolbar() {
|
||||
|
|
Loading…
Reference in a new issue