fix: 修复app suggestion perm bug (#7788)

Co-authored-by: feng626 <1304903146@qq.com>
pull/7789/head^2
fit2bot 3 years ago committed by GitHub
parent 9934007397
commit 64e0860d24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save