equal
deleted
inserted
replaced
38 class AuthInfo(StartupView): |
38 class AuthInfo(StartupView): |
39 """special management view to get cookie values to give to laxctl commands |
39 """special management view to get cookie values to give to laxctl commands |
40 which are doing datastore administration requests |
40 which are doing datastore administration requests |
41 """ |
41 """ |
42 id = 'authinfo' |
42 id = 'authinfo' |
43 __selectors__ = (none_rset, match_user_groups('managers'),) |
43 __select__ = none_rset() & match_user_groups('managers') |
44 |
44 |
45 def call(self): |
45 def call(self): |
46 cookie = self.req.get_cookie() |
46 cookie = self.req.get_cookie() |
47 values = [] |
47 values = [] |
48 if self.config['use-google-auth']: |
48 if self.config['use-google-auth']: |
60 class ContentInit(StartupView): |
60 class ContentInit(StartupView): |
61 """special management view to initialize content of a repository, |
61 """special management view to initialize content of a repository, |
62 step by step to avoid depassing quotas |
62 step by step to avoid depassing quotas |
63 """ |
63 """ |
64 id = 'contentinit' |
64 id = 'contentinit' |
65 __selectors__ = (none_rset, match_user_groups('managers'),) |
65 __select__ = none_rset() & match_user_groups('managers') |
66 |
66 |
67 def server_session(self): |
67 def server_session(self): |
68 ssession = self.config.repo_session(self.req.cnx.sessionid) |
68 ssession = self.config.repo_session(self.req.cnx.sessionid) |
69 ssession.set_pool() |
69 ssession.set_pool() |
70 return ssession |
70 return ssession |
165 self.w(u'<a href="%s">continue</a><br/>' % html_escape(self.req.url())) |
165 self.w(u'<a href="%s">continue</a><br/>' % html_escape(self.req.url())) |
166 |
166 |
167 |
167 |
168 class ContentClear(StartupView): |
168 class ContentClear(StartupView): |
169 id = 'contentclear' |
169 id = 'contentclear' |
170 __selectors__ = (none_rset, match_user_groups('managers'),) |
170 __select__ = none_rset() & match_user_groups('managers') |
171 skip_etypes = ('EGroup', 'EUser') |
171 skip_etypes = ('EGroup', 'EUser') |
172 |
172 |
173 def call(self): |
173 def call(self): |
174 # XXX should use unsafe_execute with all hooks deactivated |
174 # XXX should use unsafe_execute with all hooks deactivated |
175 # XXX step by catching datastore errors? |
175 # XXX step by catching datastore errors? |