Skip to content

Commit

Permalink
[SQL] Remove permissions for data_release in LorisMenu (#5838)
Browse files Browse the repository at this point in the history
The permissions removed in this PR are not enforced at the module level, they are solely on the LorisMenu and thus not very secure. Also, they force users to get eith upload permission or edit access permission to just be able to view the module. Users should be able to view the module without any of these permissions.
  • Loading branch information
ridz1208 authored and driusan committed Dec 17, 2019
1 parent 0b8546d commit 109a515
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 0 additions & 5 deletions SQL/0000-00-02-Menus.sql
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,6 @@ INSERT INTO LorisMenuPermissions (MenuID, PermID)
INSERT INTO LorisMenuPermissions (MenuID, PermID)
SELECT m.ID, p.PermID FROM permissions p CROSS JOIN LorisMenu m WHERE p.code='issue_tracker_developer' AND m.Label='Issue Tracker';

INSERT INTO LorisMenuPermissions (MenuID, PermID)
SELECT m.ID, p.PermID FROM permissions p CROSS JOIN LorisMenu m WHERE p.code='data_release_upload' AND m.Label='Data Release';
INSERT INTO LorisMenuPermissions (MenuID, PermID)
SELECT m.ID, p.PermID FROM permissions p CROSS JOIN LorisMenu m WHERE p.code='data_release_edit_file_access' AND m.Label='Data Release';

INSERT INTO LorisMenuPermissions (MenuID, PermID)
SELECT m.ID, p.PermID FROM permissions p CROSS JOIN LorisMenu m WHERE p.code='data_team_helper' AND m.Label='Quality Control';

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DELETE FROM LorisMenuPermissions WHERE PermID=(SELECT PermID FROM permissions WHERE code='data_release_upload');
DELETE FROM LorisMenuPermissions WHERE PermID=(SELECT PermID FROM permissions WHERE code='data_release_edit_file_access');

0 comments on commit 109a515

Please sign in to comment.