RBAC: Update library element tests to use RBAC (#66782)

* update library element tests to use RBAC

* update bits of code to use RBAC

* update library panel tests

* linting

* more linting

* and more linting

* PR feedback
This commit is contained in:
Ieva
2023-04-20 12:24:41 +03:00
committed by GitHub
parent 4e10118c3a
commit a37bf1ac2a
8 changed files with 390 additions and 380 deletions
+1
View File
@@ -32,6 +32,7 @@ func (l *LibraryElementService) requireSupportedElementKind(kindAsInt int64) err
}
func (l *LibraryElementService) requireEditPermissionsOnFolder(ctx context.Context, user *user.SignedInUser, folderID int64) error {
// TODO remove these special cases and handle General folder case in access control guardian
if isGeneralFolder(folderID) && user.HasRole(org.RoleEditor) {
return nil
}