2022-02-17 12:13:31 +00:00
|
|
|
import uuid
|
|
|
|
|
|
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
from django.db import models
|
|
|
|
|
|
|
|
|
|
|
|
class MenuPermission(models.Model):
|
|
|
|
""" 附加权限位类,用来定义无资源类的权限,不做实体资源 """
|
|
|
|
id = models.UUIDField(default=uuid.uuid4, primary_key=True)
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
default_permissions = []
|
|
|
|
verbose_name = _('Menu permission')
|
|
|
|
permissions = [
|
2022-03-10 03:25:33 +00:00
|
|
|
('view_console', _('Can view console view')),
|
|
|
|
('view_audit', _('Can view audit view')),
|
2022-04-12 06:25:49 +00:00
|
|
|
('view_workbench', _('Can view workbench view')),
|
2022-03-07 11:02:37 +00:00
|
|
|
('view_webterminal', _('Can view web terminal')),
|
|
|
|
('view_filemanager', _('Can view file manager')),
|
2023-11-03 09:33:44 +00:00
|
|
|
('view_systemtools', _('Can view System Tools')),
|
2022-02-17 12:13:31 +00:00
|
|
|
]
|