MCPcopy Index your code
hub / github.com/bugy/script-server / delete

Method delete

src/web/server.py:206–220  ·  view source on GitHub ↗
(self, user, script_name)

Source from the content-addressed store, hash-verified

204 @requires_admin_rights
205 @inject_user
206 def delete(self, user, script_name):
207 try:
208 self.application.config_service.delete_config(user, script_name)
209 except ConfigNotAllowedException:
210 LOGGER.warning(
211 f'Admin access to the script "{script_name}" is denied for {user.get_audit_name()}'
212 )
213 respond_error(self, 403, 'Access to the script is denied')
214 return
215 except NotFoundException as e:
216 LOGGER.warning(f'Failed to delete script {script_name}', exc_info=True)
217 respond_error(self, 404, str(e))
218 return
219 except InvalidAccessException as e:
220 raise tornado.web.HTTPError(403, reason=str(e)) from e
221
222
223class AdminGetScriptCodeEndpoint(BaseRequestHandler):

Callers 3

deleteBottomLinesMethod · 0.80
deleteTopLinesMethod · 0.80
deleteScriptFunction · 0.80

Calls 3

respond_errorFunction · 0.90
delete_configMethod · 0.80
get_audit_nameMethod · 0.45

Tested by

no test coverage detected