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)
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()
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
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()
def get_tags(self): tags = ACLTags() tags.update(self.siteinfo.get_tags()) return tags
def get_tags(self): tags = ACLTags(self.tokens) tags['username'] = self.username return tags