Beispiel #1
0
 def readByUserAndGroup(cls, userId, groupId):
     db = core.connect()
     return core.object(Permission.by_user_and_group(db, key=[userId, groupId]))
Beispiel #2
0
 def readByName(cls, userName):
     return core.object(SSUser.by_name(core.connect(), key=userName))
Beispiel #3
0
 def readByName(cls, userName):
     return core.object(SSUser.by_name(core.connect(), key=userName))
Beispiel #4
0
 def readByShortName(cls, shortName):
     db = core.connect()
     return core.object(Group.by_short_name(db, key=shortName))
Beispiel #5
0
 def readByLongName(cls, longName):
     db = core.connect()
     return core.object(Group.by_long_name(db, key=longName))
Beispiel #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)
Beispiel #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)
Beispiel #8
0
 def readByLongName(cls, longName):
     db = core.connect()
     return core.object(Group.by_long_name(db, key=longName))
Beispiel #9
0
 def readByShortName(cls, shortName):
     db = core.connect()
     return core.object(Group.by_short_name(db, key=shortName))
Beispiel #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)
Beispiel #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)
Beispiel #12
0
 def readByUserAndGroup(cls, userId, groupId):
     db = core.connect()
     return core.object(
         Permission.by_user_and_group(db, key=[userId, groupId]))