Merge pull request #3094 from urbanrotnik/ur-sci-5415-wrong-permissions

Fix permissions check for cards [SCI-5415]
This commit is contained in:
Urban Rotnik 2021-01-18 16:26:12 +01:00 committed by GitHub
commit 6e488d8595
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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() {