Example #1
0
File: Domain.py Project: drxbate/M1
 def querySubDomain(cls,parent=None,TopLevelOnly=False):
     if TopLevelOnly==True:
         if Context.CurrentSession.allow("system"):
             return DomainCollection(UserHandler.find_domain(parent=""))
         else:
             return DomainCollection(UserHandler.find_domain(parent=Context.CurrentSession.domain))
     if parent!=None:
         return DomainCollection(UserHandler.find_domain(parent=parent))
Example #2
0
File: Domain.py Project: drxbate/M1
 def saveDomain(cls,id,domain,parent):
     objid=UserHandler.update_domain(id=id,name=domain, parent=parent)
     return objid
Example #3
0
File: Domain.py Project: drxbate/M1
 def addDomain(cls,domain,parent):
     objid=UserHandler.update_domain(name=domain, parent=parent)
     return objid
Example #4
0
File: Domain.py Project: drxbate/M1
 def getDomain(cls,id):
     if not utility.is_validId(id):
         return None
     for i in DomainCollection(UserHandler.find_domain(id=id)):
         return i
Example #5
0
File: Domain.py Project: drxbate/M1
 def parent(self):
     for p in self.__parents__:
         if p!="" and p!=None:
             for i in DomainCollection(UserHandler.find_domain(id=p)):
                 return i
Example #6
0
File: Domain.py Project: drxbate/M1
 def createDomain(cls,domain,parentDomain):
     UserHandler.update_domain(domain, parentDomain)