mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-10-21 07:49:45 +00:00
[update] 修改remote apps的serializer
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
# coding: utf-8
|
||||
#
|
||||
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from common.utils import lazyproperty
|
||||
from .base import BasePermission
|
||||
|
||||
__all__ = [
|
||||
@@ -22,3 +22,11 @@ class RemoteAppPermission(BasePermission):
|
||||
|
||||
def get_all_remote_apps(self):
|
||||
return set(self.remote_apps.all())
|
||||
|
||||
@lazyproperty
|
||||
def remote_apps_amount(self):
|
||||
return self.remote_apps.count()
|
||||
|
||||
@lazyproperty
|
||||
def system_users_amount(self):
|
||||
return self.system_users.count()
|
||||
|
Reference in New Issue
Block a user