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])
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])
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], )
def get_permissions(self): # Generate permission set on-the-fly return [("section:%s" % x.__class__.__name__, _(x.title)) for x in SectionPlugin.get_instances()]
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])
def get_permissions(self): # Generate permission set on-the-fly return [ ('section:%s' % x.__class__.__name__, _(x.title)) for x in SectionPlugin.get_instances() ]