MCPcopy
hub / github.com/HelloZeroNet/ZeroNet / hasCmdPermission

Method hasCmdPermission

src/Ui/UiWebsocket.py:113–118  ·  view source on GitHub ↗
(self, cmd)

Source from the content-addressed store, hash-verified

111
112 # Has permission to run the command
113 def hasCmdPermission(self, cmd):
114 flags = flag.db.get(self.getCmdFuncName(cmd), ())
115 if "admin" in flags and "ADMIN" not in self.permissions:
116 return False
117 else:
118 return True
119
120 # Has permission to access a site
121 def hasSitePermission(self, address, cmd=None):

Callers 1

handleRequestMethod · 0.95

Calls 2

getCmdFuncNameMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected