Update docs based on new action options
This commit is contained in:
@@ -49,16 +49,14 @@ snippet demonstrates usage of the ``ActionPermissionValidator``.
|
|||||||
name: str
|
name: str
|
||||||
apps = []
|
apps = []
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def _init_action_manager(self) -> ActionManager:
|
||||||
super().__init__(**kwargs)
|
am = super()._init_action_manager()
|
||||||
self.action_manager = ActionManager()
|
am.add_action(
|
||||||
|
|
||||||
self.action_manager.add_action(
|
|
||||||
"reset_factory_settings",
|
"reset_factory_settings",
|
||||||
Action(
|
Action(
|
||||||
func = lambda request, context: self.reset_factory_settings(),
|
func = lambda request, context: self.reset_factory_settings(),
|
||||||
validator = GroupMembershipValidator([AccountGroup.DOMAIN_ADMIN]),
|
validator = GroupMembershipValidator([AccountGroup.DOMAIN_ADMIN]),
|
||||||
),
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
def reset_factory_settings(self):
|
def reset_factory_settings(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user