mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-10 21:33:29 +00:00
fix: 修复app suggestion perm bug (#7788)
Co-authored-by: feng626 <1304903146@qq.com>
This commit is contained in:
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
Block a user