@@ -627,12 +627,12 @@ func TestRolePermissions(t *testing.T) {
627627 // Members may not access other members' preferences
628628 Name : "NotificationPreferencesOtherUser" ,
629629 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
631631 AuthorizeMap : map [bool ][]hasAuthSubjects {
632- true : {orgAdmin , owner },
632+ true : {owner },
633633 false : {
634634 memberMe , templateAdmin , orgUserAdmin , userAdmin ,
635- orgAuditor , orgTemplateAdmin ,
635+ orgAdmin , orgAuditor , orgTemplateAdmin ,
636636 otherOrgMember , otherOrgAuditor , otherOrgUserAdmin , otherOrgTemplateAdmin ,
637637 otherOrgAdmin , orgMemberMe ,
638638 },
@@ -678,37 +678,6 @@ func TestRolePermissions(t *testing.T) {
678678 },
679679 },
680680 },
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- },
712681 }
713682
714683 // We expect every permission to be tested above.
0 commit comments