예제 #1
0
 def __reginit__(self, login, name, **kw):
     self.login = login
     self.name = name
     self.loaded = False
     self.s_tokens = ACLTags()
     self.l_tokens = ACLTags()
     self.load()
     self.set_tokens(**kw)
예제 #2
0
 def __reginit__(self):
     self.authenticated = False
     self.authorized = False
     self.clientdb = ClientDB()
     self.acldb = ACLDB()
     # this one is to do operation on sites from the console
     # or the command line
     self._sitedb = SiteDB()
     self.tags = ACLTags()
예제 #3
0
 def get_tags(self, strict=False):
     tags = ACLTags()
     if not strict or not self.login:
         tags.update(self.s_tokens)
     if not strict or self.login:
         tags.update(self.l_tokens)
     if self.login:
         tags['login'] = self.login
     tags['name'] = self.name
     return tags
예제 #4
0
    def __reginit__(self, username, **tokens):
        """
        Create a new ClientInfo object, and set the username.

        @param username: the client's username
        @type username: str
        @param **kw: optional context information
        @type **kw: dict
        """
        self.tokens = ACLTags(tokens)
        self.username = username
        self.load()
예제 #5
0
 def get_tags(self):
     tags = ACLTags()
     tags.update(self.siteinfo.get_tags())
     return tags
예제 #6
0
 def get_tags(self):
     tags = ACLTags(self.tokens)
     tags['username'] = self.username
     return tags