specified configuration files will be queried.
"""
- roles = ['admin']
+ roles = ['admin', 'pi', 'user']
accepts = [
Auth(),
conf_files = ConfFiles(self.api, [conf_file_id])
if not conf_files:
raise PLCInvalidArgument, "No such configuration file"
-
conf_file = conf_files[0]
+
+ if 'admin' not in self.caller['roles']:
+ if conf_file['creator_id'] not in [self.caller['site_ids']]:
+ raise PLCPermissionDenied, "You must be the creator of this conf file."
+
conf_file.delete()
self.event_objects = {'ConfFile': [conf_file['conf_file_id']]}