MCPcopy Create free account
hub / github.com/TimMcCool/scratchattach / _assert_permission

Method _assert_permission

scratchattach/site/project.py:269–272  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

267 return requests.get(self.thumbnail_url).content
268
269 def _assert_permission(self):
270 session = self._assert_auth()
271 if session.username != self.author_name:
272 raise exceptions.Unauthorized("You need to be authenticated as the profile owner to do this.")
273
274 def load_description(self):
275 # Overrides the load_description method that exists for unshared projects

Callers 7

set_bodyMethod · 0.95
set_jsonMethod · 0.95
set_fieldsMethod · 0.95
shareMethod · 0.95
unshareMethod · 0.95
set_thumbnailMethod · 0.95
delete_commentMethod · 0.95

Calls 1

_assert_authMethod · 0.45

Tested by

no test coverage detected