mirror of https://github.com/jumpserver/jumpserver
parent
9934007397
commit
64e0860d24
|
@ -27,7 +27,8 @@ class ApplicationViewSet(SuggestionMixin, OrgBulkModelViewSet):
|
|||
'suggestion': serializers.MiniAppSerializer
|
||||
}
|
||||
rbac_perms = {
|
||||
'get_tree': 'applications.view_application'
|
||||
'get_tree': 'applications.view_application',
|
||||
'match': 'assets.match_application'
|
||||
}
|
||||
|
||||
@action(methods=['GET'], detail=False, url_path='tree')
|
||||
|
|
|
@ -219,6 +219,9 @@ class Application(CommonModelMixin, OrgModelMixin, ApplicationTreeNodeMixin):
|
|||
verbose_name = _('Application')
|
||||
unique_together = [('org_id', 'name')]
|
||||
ordering = ('name',)
|
||||
permissions = [
|
||||
('match_application', _('Can match application')),
|
||||
]
|
||||
|
||||
def __str__(self):
|
||||
category_display = self.get_category_display()
|
||||
|
|
Loading…
Reference in New Issue