Closed MariellaF closed 1 year ago
@fwild Hello. I suggest that we implement this feature giving the possibility of specifying a "public" flag to the POST request. Given that a token is provided, if the flag passed has "1" value or the flag is not passed, the endpoint should returns public activities and also activities private to the userid passed, as the endpoint it is doing at this time. If the flag is specified has "0" value, then I suggest that we would return only the activities public and private to the userid passed.
Makes sense!
If the request is started by someone with admin privileges, then it should return private and public resources, otherwise only public resources!
e.g. via URL parameter "filter_by_userid=pasquale*"
@fwild I have reused the userid instead of adding a parameter as the id of the user that is making the request is the user that sends the token.
A server side method is needed to obtain the list of userid user activities. So we need a rest method to be called with a userid parameter that returns a json with the list of the ONLY activities of the userid user. In fact, in several cases is useless to obtain a complete list of all users activities and then filter locally by userid.