示例#1
0
 def get_permissions(self):
     # Generate permission set on-the-fly
     return sorted([('section:%s' % x.__class__.__name__,
                     (_(x.category) or 'Ajenti') + ' | ' + _(x.title))
                    for x in SectionPlugin.get_instances()
                    if not hasattr(x, 'permissionless')],
                   key=lambda x: x[1])
示例#2
0
文件: main.py 项目: AojiaoZero/ajenti
 def get_permissions(self):
     # Generate permission set on-the-fly
     return sorted([
         ('section:%s' % x.__class__.__name__, (_(x.category) or 'Ajenti') + ' | ' + _(x.title))
         for x in SectionPlugin.get_instances()
         if not hasattr(x, 'permissionless') and not hasattr(x, 'uses_access_permission_of')
     ], key=lambda x: x[1])
示例#3
0
文件: main.py 项目: RaptorNode/ajenti
 def get_permissions(self):
     # Generate permission set on-the-fly
     return sorted(
         [
             ("section:%s" % x.__class__.__name__, (_(x.category) or "Ajenti") + " | " + _(x.title))
             for x in SectionPlugin.get_instances()
         ],
         key=lambda x: x[1],
     )
示例#4
0
文件: main.py 项目: jareis/ajenti
 def get_permissions(self):
     # Generate permission set on-the-fly
     return [("section:%s" % x.__class__.__name__, _(x.title)) for x in SectionPlugin.get_instances()]
示例#5
0
文件: main.py 项目: Carolusian/ajenti
 def get_permissions(self):
     # Generate permission set on-the-fly
     return sorted([
         ('section:%s' % x.__class__.__name__, _(x.title))
         for x in SectionPlugin.get_instances()
     ], key=lambda x: x[1])
示例#6
0
 def get_permissions(self):
     # Generate permission set on-the-fly
     return [
         ('section:%s' % x.__class__.__name__, _(x.title))
         for x in SectionPlugin.get_instances()
     ]