Esempio n. 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])
Esempio n. 2
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') and not hasattr(x, 'uses_access_permission_of')
     ], key=lambda x: x[1])
Esempio n. 3
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()
         ],
         key=lambda x: x[1],
     )
Esempio n. 4
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()]
Esempio n. 5
0
 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])
Esempio n. 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()
     ]