"/policies/<string:uuid>/subject_assignments/<string:perimeter_id>/<string:category_id>/<string:data_id>",
)
+ @validate_input("get", kwargs_state=[True, False, False,False,False])
@check_auth
- def get(self, uuid=None, perimeter_id=None, category_id=None,
+ def get(self, uuid, perimeter_id=None, category_id=None,
data_id=None, user_id=None):
"""Retrieve all subject assignments or a specific one for a given policy
"error": str(e)}, 500
return {"subject_assignments": data}
+ @validate_input("post", kwargs_state=[True, False, False, False, False], body_state=[True, True, True])
@check_auth
- def post(self, uuid=None, perimeter_id=None, category_id=None,
+ def post(self, uuid, perimeter_id=None, category_id=None,
data_id=None, user_id=None):
"""Create a subject assignment.
"error": str(e)}, 500
return {"subject_assignments": data}
+ @validate_input("delete", kwargs_state=[True, True, True, True, False])
@check_auth
- def delete(self, uuid=None, perimeter_id=None, category_id=None,
+ def delete(self, uuid, perimeter_id=None, category_id=None,
data_id=None, user_id=None):
"""Delete a subject assignment for a given policy
"/policies/<string:uuid>/object_assignments/<string:perimeter_id>/<string:category_id>/<string:data_id>",
)
+ @validate_input("get", kwargs_state=[True, False, False,False,False])
@check_auth
- def get(self, uuid=None, perimeter_id=None, category_id=None,
+ def get(self, uuid, perimeter_id=None, category_id=None,
data_id=None, user_id=None):
"""Retrieve all object assignment or a specific one for a given policy
"error": str(e)}, 500
return {"object_assignments": data}
+ @validate_input("post", kwargs_state=[True, False, False, False, False], body_state=[True, True, True])
@check_auth
- def post(self, uuid=None, perimeter_id=None, category_id=None,
+ def post(self, uuid, perimeter_id=None, category_id=None,
data_id=None, user_id=None):
"""Create an object assignment.
"error": str(e)}, 500
return {"object_assignments": data}
+ @validate_input("delete", kwargs_state=[True, True, True, True, False])
@check_auth
- def delete(self, uuid=None, perimeter_id=None, category_id=None,
+ def delete(self, uuid, perimeter_id=None, category_id=None,
data_id=None, user_id=None):
"""Delete a object assignment for a given policy
"/policies/<string:uuid>/action_assignments/<string:perimeter_id>/<string:category_id>/<string:data_id>",
)
+ @validate_input("get", kwargs_state=[True, False, False,False,False])
@check_auth
- def get(self, uuid=None, perimeter_id=None, category_id=None,
+ def get(self, uuid, perimeter_id=None, category_id=None,
data_id=None, user_id=None):
"""Retrieve all action assignment or a specific one for a given policy
"error": str(e)}, 500
return {"action_assignments": data}
+ @validate_input("post", kwargs_state=[True, False, False, False, False], body_state=[True, True, True])
@check_auth
- def post(self, uuid=None, perimeter_id=None, category_id=None,
+ def post(self, uuid, perimeter_id=None, category_id=None,
data_id=None, user_id=None):
"""Create an action assignment.
"error": str(e)}, 500
return {"action_assignments": data}
+ @validate_input("delete", kwargs_state=[True, True, True, True, False])
@check_auth
- def delete(self, uuid=None, perimeter_id=None, category_id=None,
+ def delete(self, uuid, perimeter_id=None, category_id=None,
data_id=None, user_id=None):
"""Delete a action assignment for a given policy
"<string:data_id>",
)
+ @validate_input("get", kwargs_state=[True, False, False, False])
@check_auth
- def get(self, uuid=None, category_id=None, data_id=None, user_id=None):
- """Retrieve all subject categories or a specific one if sid is given
+ def get(self, uuid, category_id=None, data_id=None, user_id=None):
+ """Retrieve all subject categories or a specific one if data_id is given
for a given policy
:param uuid: uuid of the policy
"error": str(e)}, 500
return {"subject_data": data}
+ @validate_input("post", kwargs_state=[True, True, False, False], body_state=[True, False])
@check_auth
- def post(self, uuid=None, category_id=None, data_id=None, user_id=None):
+ def post(self, uuid, category_id=None, data_id=None, user_id=None):
"""Create or update a subject.
:param uuid: uuid of the policy
"error": str(e)}, 500
return {"subject_data": data}
+ @validate_input("delete", kwargs_state=[True, False, False, False])
@check_auth
- def delete(self, uuid=None, category_id=None, data_id=None, user_id=None):
+ def delete(self, uuid, category_id=None, data_id=None, user_id=None):
"""Delete a subject for a given policy
:param uuid: uuid of the policy
"<string:data_id>",
)
+ @validate_input("get", kwargs_state=[True, False, False, False])
@check_auth
- def get(self, uuid=None, category_id=None, data_id=None, user_id=None):
+ def get(self, uuid, category_id=None, data_id=None, user_id=None):
"""Retrieve all object categories or a specific one if sid is given
for a given policy
"error": str(e)}, 500
return {"object_data": data}
+ @validate_input("post", kwargs_state=[True, True, False, False], body_state=[True, False])
@check_auth
- def post(self, uuid=None, category_id=None, data_id=None, user_id=None):
+ def post(self, uuid, category_id=None, data_id=None, user_id=None):
"""Create or update a object.
:param uuid: uuid of the policy
"error": str(e)}, 500
return {"object_data": data}
+ @validate_input("delete", kwargs_state=[True, False, False, False])
@check_auth
- def delete(self, uuid=None, category_id=None, data_id=None, user_id=None):
+ def delete(self, uuid, category_id=None, data_id=None, user_id=None):
"""Delete a object for a given policy
:param uuid: uuid of the policy
"<string:data_id>",
)
+ @validate_input("get", kwargs_state=[True, False, False, False])
@check_auth
- def get(self, uuid=None, category_id=None, data_id=None, user_id=None):
+ def get(self, uuid, category_id=None, data_id=None, user_id=None):
"""Retrieve all action categories or a specific one if sid is given
for a given policy
"error": str(e)}, 500
return {"action_data": data}
+ @validate_input("post", kwargs_state=[True, True, False, False], body_state=[True, False])
@check_auth
- def post(self, uuid=None, category_id=None, data_id=None, user_id=None):
+ def post(self, uuid, category_id=None, data_id=None, user_id=None):
"""Create or update a action.
:param uuid: uuid of the policy
"error": str(e)}, 500
return {"action_data": data}
+ @validate_input("delete", kwargs_state=[True, False, False, False])
@check_auth
- def delete(self, uuid=None, category_id=None, data_id=None, user_id=None):
+ def delete(self, uuid, category_id=None, data_id=None, user_id=None):
"""Delete a action for a given policy
:param uuid: uuid of the policy
"error": str(e)}, 500
return {"meta_rules": data}
+ @validate_input("patch", kwargs_state=[True, False], body_state=[True, True, True, True])
@check_auth
- def patch(self, meta_rule_id=None, user_id=None):
+ def patch(self, meta_rule_id, user_id=None):
"""Update a meta rule
:param meta_rule_id: Meta rule ID
"error": str(e)}, 500
return {"meta_rules": data}
+ @validate_input("delete", kwargs_state=[True, False])
@check_auth
- def delete(self, meta_rule_id=None, user_id=None):
+ def delete(self, meta_rule_id, user_id=None):
"""Delete a meta rule
:param meta_rule_id: Meta rule ID
"error": str(e)}, 500
return {"models": data}
+ @validate_input("delete", kwargs_state=[True, False])
@check_auth
- def delete(self, uuid=None, user_id=None):
+ def delete(self, uuid, user_id=None):
"""Delete a model
:param uuid: uuid of the model to delete
"error": str(e)}, 500
return {"result": True}
+ @validate_input("patch", kwargs_state=[True, False], body_state=[True, False, True])
@check_auth
- def patch(self, uuid=None, user_id=None):
+ def patch(self, uuid, user_id=None):
"""Update a model
:param uuid: uuid of the model to update
"error": str(e)}, 500
return {"pdps": data}
+ @validate_input("delete", kwargs_state=[True, False])
@check_auth
- def delete(self, uuid=None, user_id=None):
+ def delete(self, uuid, user_id=None):
"""Delete a pdp
:param uuid: uuid of the pdp to delete
"error": str(e)}, 500
return {"result": True}
+ @validate_input("patch", kwargs_state=[True, False], body_state=[True, True, True, False])
@check_auth
- def patch(self, uuid=None, user_id=None):
+ def patch(self, uuid, user_id=None):
"""Update a pdp
:param uuid: uuid of the pdp to update
"error": str(e)}, 500
return {"subjects": data}
+ @validate_input("patch", kwargs_state=[False, True, False], body_state=[True, False, False, False])
@check_auth
- def patch(self, uuid=None, perimeter_id=None, user_id=None):
+ def patch(self, uuid, perimeter_id=None, user_id=None):
"""Create or update a subject.
:param uuid: uuid of the policy
"error": str(e)}, 500
return {"objects": data}
+ @validate_input("patch", kwargs_state=[False, True, False], body_state=[True, False, False, False])
@check_auth
- def patch(self, uuid=None, perimeter_id=None, user_id=None):
+ def patch(self, uuid, perimeter_id=None, user_id=None):
"""Create or update a object.
:param uuid: uuid of the policy
"error": str(e)}, 500
return {"actions": data}
+ @validate_input("patch", kwargs_state=[False, True, False], body_state=[True, False, False, False])
@check_auth
- def patch(self, uuid=None, perimeter_id=None, user_id=None):
+ def patch(self, uuid, perimeter_id=None, user_id=None):
"""Create or update a action.
:param uuid: uuid of the policy