New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename partial permissions variables #4731
Conversation
(in preparation to add …PartialByResponses`)
/** Names of checkboxes for partial permissions (the counterparts). */ | ||
export type CheckboxNamePartialByUsers = | ||
| 'submissionsViewPartialByUsers' | ||
| 'submissionsEditPartialByUsers' | ||
| 'submissionsValidatePartialByUsers' | ||
| 'submissionsDeletePartialByUsers'; | ||
/** All checkboxes names combined. */ | ||
export type CheckboxNameAll = CheckboxNameRegular | CheckboxNamePartialByUsers; | ||
/** Name of lists of usernames for a partial permissions checkboxes. */ | ||
export type PartialByUsersListName = | ||
| 'submissionsViewPartialByUsersList' | ||
| 'submissionsEditPartialByUsersList' | ||
| 'submissionsDeletePartialByUsersList' | ||
| 'submissionsValidatePartialByUsersList'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you turned CheckboxNamePartialByUsers
and PartialByUsersListName
into enum
s, it looks like you could delete getPartialByUsersListName()
and getPartialByUsersCheckboxName()
. (A frozen const
object would also work, but at that point it's just an enum
with more steps.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice idea, I will try doing it on feature-extend-partial-perms--add-partial-by-responses
as I think I have more of these functions there already
Checklist
Description
Internal cleanup
Notes
Renamed everything related to partial permissions (for a selected list of users) to make room for more partial permissions (for particular responses). So basically we use
…PartialByUsers
instead of…Partial
, because we will be adding…PartialByResponses
:)Needed for
feature/extend-partial-perms