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

Method POST

openlibrary/plugins/admin/code.py:682–699  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

680 return doc
681
682 def POST(self):
683 i = web.input(
684 perm_pages="/permission/loggedinusers",
685 perm_records="/permission/loggedinusers",
686 )
687
688 root = self.set_permission("/", i.perm_pages)
689 works = self.set_permission("/works", i.perm_records)
690 books = self.set_permission("/books", i.perm_records)
691 authors = self.set_permission("/authors", i.perm_records)
692 web.ctx.site.save_many(
693 [root, works, books, authors],
694 comment="Updated edit policy.",
695 action="bulk-edit-permissions",
696 )
697
698 add_flash_message("info", "Edit policy has been updated!")
699 return self.GET()
700
701
702class attach_debugger:

Callers

nothing calls this directly

Calls 3

set_permissionMethod · 0.95
GETMethod · 0.95
save_manyMethod · 0.45

Tested by

no test coverage detected