Esempio n. 1
0
 def readByUserAndGroup(cls, userId, groupId):
     db = core.connect()
     return core.object(Permission.by_user_and_group(db, key=[userId, groupId]))
Esempio n. 2
0
 def readByName(cls, userName):
     return core.object(SSUser.by_name(core.connect(), key=userName))
Esempio n. 3
0
 def readByName(cls, userName):
     return core.object(SSUser.by_name(core.connect(), key=userName))
Esempio n. 4
0
 def readByShortName(cls, shortName):
     db = core.connect()
     return core.object(Group.by_short_name(db, key=shortName))
Esempio n. 5
0
 def readByLongName(cls, longName):
     db = core.connect()
     return core.object(Group.by_long_name(db, key=longName))
Esempio n. 6
0
 def dbShortName(cls, shortName, absolute=False):
     result = core.object(Group.by_short_name(core.connect(), key=shortName))
     if result:
         return "%s/group/%s" % ((result.source.server or ""), result.id)
Esempio n. 7
0
 def dbLongName(cls, longName, absolute=False):
     result = core.object(Group.by_long_name(core.connect(), key=longName))
     if result:
         return "%s/group/%s" % ((result.source.server or ""), result.id)
Esempio n. 8
0
 def readByLongName(cls, longName):
     db = core.connect()
     return core.object(Group.by_long_name(db, key=longName))
Esempio n. 9
0
 def readByShortName(cls, shortName):
     db = core.connect()
     return core.object(Group.by_short_name(db, key=shortName))
Esempio n. 10
0
 def dbLongName(cls, longName, absolute=False):
     result = core.object(Group.by_long_name(core.connect(), key=longName))
     if result:
         return "%s/group/%s" % ((result.source.server or ''), result.id)
Esempio n. 11
0
 def dbShortName(cls, shortName, absolute=False):
     result = core.object(Group.by_short_name(core.connect(), key=shortName))
     if result:
         return "%s/group/%s" % ((result.source.server or ''), result.id)
Esempio n. 12
0
 def readByUserAndGroup(cls, userId, groupId):
     db = core.connect()
     return core.object(
         Permission.by_user_and_group(db, key=[userId, groupId]))