MCPcopy Create free account
hub / github.com/internetarchive/openlibrary / is_admin

Method is_admin

openlibrary/plugins/admin/code.py:154–156  ·  view source on GitHub ↗

Returns True if the current user is in admin usergroup.

(self)

Source from the content-addressed store, hash-verified

152 GET = POST = delegate
153
154 def is_admin(self):
155 """Returns True if the current user is in admin usergroup."""
156 return context.user and context.user.key in [m.key for m in web.ctx.site.get("/usergroup/admin").members]
157
158
159class admin_index:

Callers 11

handleMethod · 0.95
GETMethod · 0.45
POSTMethod · 0.45
has_permissionMethod · 0.45
has_permissionMethod · 0.45
GETMethod · 0.45
user_can_revert_recordsFunction · 0.45
recaptcha_exemptFunction · 0.45
saveMethod · 0.45
is_spamFunction · 0.45

Calls 1

getMethod · 0.45

Tested by

no test coverage detected