-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: housekeepingChanges to the application which do not directly impact the end userChanges to the application which do not directly impact the end user
Milestone
Description
Proposed Changes
ActionsMixin defines two attributes on a view:
actions- A tuple of support action namesaction_perms- A dictionary mapping of action names to a set of required permissions for each
The following actions are defined by default:
actions = ('add', 'import', 'export', 'bulk_edit', 'bulk_delete')
action_perms = defaultdict(set, **{
'add': {'add'},
'import': {'add'},
'bulk_edit': {'change'},
'bulk_delete': {'delete'},
})These can be combined into a single mapping:
actions = {
'add': {'add'},
'import': {'add'},
'export': set(),
'bulk_edit': {'change'},
'bulk_delete': {'delete'},
}Justification
This change will simplify the list of support actions for a view and reduce duplicate code.
Metadata
Metadata
Assignees
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: housekeepingChanges to the application which do not directly impact the end userChanges to the application which do not directly impact the end user