Skip to content

Commit

Permalink
Allowing fallthrough
Browse files Browse the repository at this point in the history
  • Loading branch information
COMTOP1 committed Feb 5, 2024
1 parent b324605 commit 909bb7e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions infrastructure/permission/validPermissions.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,43 +13,60 @@ func SufficientPermissionsFor(p permissions.Permissions) (m map[string]bool) {
m[permissions.MenuDisabled.String()] = true
return m
case permissions.ManageMembersMembersList:
fallthrough
case permissions.ManageMembersMembersAdd:
m[permissions.ManageMembersMembersAdmin.String()] = true
fallthrough
case permissions.ManageMembersPermissions:
fallthrough
case permissions.ManageMembersMicsKeyList:
fallthrough
case permissions.ManageMembersMiscUnpaidList:
fallthrough
case permissions.ManageMembersOfficers:
fallthrough
case permissions.ManageMembersGroup:
fallthrough
case permissions.ManageMembersMembersAdmin:
m[permissions.ManageMembersAdmin.String()] = true
break
case permissions.EmailAccess:
fallthrough
case permissions.EmailAlumni:
fallthrough
case permissions.EmailOfficers:
m[permissions.EmailEveryone.String()] = true
break
case permissions.CalendarSocialCreator:
m[permissions.CalendarSocialAdmin.String()] = true
fallthrough
case permissions.CalendarSocialAdmin:
m[permissions.CalendarAdmin.String()] = true
break
case permissions.CalendarShowCreator:
m[permissions.CalendarShowAdmin.String()] = true
fallthrough
case permissions.CalendarShowAdmin:
m[permissions.CalendarAdmin.String()] = true
break
case permissions.CalendarMeetingCreator:
m[permissions.CalendarMeetingAdmin.String()] = true
fallthrough
case permissions.CalendarMeetingAdmin:
m[permissions.CalendarAdmin.String()] = true
break
case permissions.CMSNewsItemCreator:
m[permissions.CMSNewsItemAdmin.String()] = true
fallthrough
case permissions.CMSNewsItemAdmin:
m[permissions.CMSNewsAdmin.String()] = true
fallthrough
case permissions.CMSEndboardAdmin:
fallthrough
case permissions.CMSView:
fallthrough
case permissions.CMSPermalinkAdmin:
fallthrough
case permissions.CMSNewsAdmin:
m[permissions.CMSAdmin.String()] = true
break
Expand All @@ -59,11 +76,13 @@ func SufficientPermissionsFor(p permissions.Permissions) (m map[string]bool) {
break
case permissions.CMSPageCreator:
m[permissions.CMSPageAdmin.String()] = true
fallthrough
case permissions.CMSPageAdmin:
m[permissions.CMSAdmin.String()] = true
break
case permissions.CMSSlideshowCreator:
m[permissions.CMSSlideshowAdmin.String()] = true
fallthrough
case permissions.CMSSlideshowAdmin:
m[permissions.CMSAdmin.String()] = true
break
Expand Down

0 comments on commit 909bb7e

Please sign in to comment.