596 def properties(self): |
596 def properties(self): |
597 """Return a result set containing system wide properties. |
597 """Return a result set containing system wide properties. |
598 |
598 |
599 This is a public method, not requiring a session id. |
599 This is a public method, not requiring a session id. |
600 """ |
600 """ |
601 with self.internal_cnx() as cnx, cnx.ensure_cnx_set: |
601 with self.internal_cnx() as cnx: |
602 # don't use cnx.execute, we don't want rset.req set |
602 with cnx.ensure_cnx_set: |
603 return self.querier.execute(cnx, 'Any K,V WHERE P is CWProperty,' |
603 # don't use cnx.execute, we don't want rset.req set |
604 'P pkey K, P value V, NOT P for_user U', |
604 return self.querier.execute(cnx, 'Any K,V WHERE P is CWProperty,' |
605 build_descr=False) |
605 'P pkey K, P value V, NOT P for_user U', |
|
606 build_descr=False) |
606 |
607 |
607 # XXX protect this method: anonymous should be allowed and registration |
608 # XXX protect this method: anonymous should be allowed and registration |
608 # plugged |
609 # plugged |
609 def register_user(self, login, password, email=None, **kwargs): |
610 def register_user(self, login, password, email=None, **kwargs): |
610 """check a user with the given login exists, if not create it with the |
611 """check a user with the given login exists, if not create it with the |