Skip to content
Snippets Groups Projects
Commit 61f54eac authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FEAT #11403 TIME 0:10 prevent following out of perimeter resource

parent a3567beb
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,10 @@ class UsersFollowedResourcesController
{
public function follow(Request $request, Response $response, array $args)
{
if (!ResController::hasRightByResId(['resId' => [$args['resId']], 'userId' => $GLOBALS['id']])){
return $response->withStatus(403)->withJson(['errors' => 'Document out of perimeter']);
}
UsersFollowedResourcesController::followResource($args);
return $response->withStatus(204);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment