@@ -627,12 +627,12 @@ func TestRolePermissions(t *testing.T) {
627
627
// Members may not access other members' preferences
628
628
Name :"NotificationPreferencesOtherUser" ,
629
629
Actions : []policy.Action {policy .ActionRead ,policy .ActionUpdate },
630
- Resource :rbac .ResourceNotificationPreference .InOrg ( orgID ). WithOwner (uuid .NewString ()),// some other user
630
+ Resource :rbac .ResourceNotificationPreference .WithOwner (uuid .NewString ()),// some other user
631
631
AuthorizeMap :map [bool ][]hasAuthSubjects {
632
- true : {orgAdmin , owner },
632
+ true : {owner },
633
633
false : {
634
634
memberMe ,templateAdmin ,orgUserAdmin ,userAdmin ,
635
- orgAuditor ,orgTemplateAdmin ,
635
+ orgAdmin , orgAuditor ,orgTemplateAdmin ,
636
636
otherOrgMember ,otherOrgAuditor ,otherOrgUserAdmin ,otherOrgTemplateAdmin ,
637
637
otherOrgAdmin ,orgMemberMe ,
638
638
},
@@ -678,37 +678,6 @@ func TestRolePermissions(t *testing.T) {
678
678
},
679
679
},
680
680
},
681
- {
682
- // Notification preferences are currently not organization-scoped
683
- // Any owner/admin across any organization may access any users' preferences
684
- // Members may access their own preferences
685
- Name :"NotificationPreferencesAnyOrg" ,
686
- Actions : []policy.Action {policy .ActionRead ,policy .ActionUpdate },
687
- Resource :rbac .ResourceNotificationPreference .AnyOrganization ().WithOwner (currentUser .String ()),
688
- AuthorizeMap :map [bool ][]hasAuthSubjects {
689
- true : {orgMemberMe ,orgAdmin ,otherOrgAdmin ,owner },
690
- false : {
691
- memberMe ,templateAdmin ,otherOrgUserAdmin ,userAdmin ,orgUserAdmin ,
692
- orgAuditor ,orgTemplateAdmin ,
693
- otherOrgMember ,otherOrgAuditor ,otherOrgTemplateAdmin ,
694
- },
695
- },
696
- },
697
- {
698
- // Notification templates are currently not organization-scoped
699
- // Any owner/admin across any organization may access notification templates
700
- Name :"NotificationTemplateAnyOrg" ,
701
- Actions : []policy.Action {policy .ActionRead ,policy .ActionUpdate },
702
- Resource :rbac .ResourceNotificationPreference .AnyOrganization (),
703
- AuthorizeMap :map [bool ][]hasAuthSubjects {
704
- true : {orgAdmin ,otherOrgAdmin ,owner },
705
- false : {
706
- orgMemberMe ,memberMe ,templateAdmin ,orgUserAdmin ,userAdmin ,
707
- orgAuditor ,orgTemplateAdmin ,
708
- otherOrgMember ,otherOrgAuditor ,otherOrgUserAdmin ,otherOrgTemplateAdmin ,
709
- },
710
- },
711
- },
712
681
}
713
682
714
683
// We expect every permission to be tested above.