•  
      request #9498 Error when refreshing certain artifacts
    Infos
    #9498
    Patrick-Jeffrey Pollo Guilbert (epatpol)
    2017-06-07 19:58
    2016-09-15 17:31
    9769
    Details
    Error when refreshing certain artifacts
    I get the following error when trying to refresh certain artifacts from certain trackers :

    null
    org.tuleap.mylyn.task.core
    Error
    Thu Sep 15 10:51:31 EDT 2016
    An error 403 occurred while invoking GET /api/v1/projects/199/user_groups: Forbidden: Permission Denied

    Looking at the api explorer, it seems like there is a padlock next to that route. Does that mean it's restricted to certain people with the correct access rights only? Using postman, I can reproduce the error with the same route, so I assume the connector behavior is normal. The thing is, even if the error is informative, I'm not entirely sure it's a good thing to show it to the user, why is the connector even trying to access it in the first place etc.
    Mylyn
    Empty
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Patricia Carrasco (pcar)
    Stage
    Empty
    New
    Empty
    Attachments
    Empty
    References
    References list is empty

    Follow-ups

    User avatar

    Is listing people who are members not a feature of the connector?

    I don't know

    AFAIR, the tracker routes were designed to return a list of people when needed (in tracker structure for list fields bounds to user groups) so fetching the list of users shouldn't be required.

    User avatar
    Is listing people who are members not a feature of the connector? If that is indeed the case, then I'm really not sure why the connector executes the following code:

    for (TuleapUserGroup userGroup : tuleapRestClient.getProjectUserGroups(project.getIdentifier(),
    monitor)) {
    for (TuleapUser tuleapUser : tuleapRestClient.getUserGroupUsers(userGroup.getId(), monitor)) {
    server.register(tuleapUser);
    }

    The register function and the map it updates is pretty much only used in tests.
    }
    User avatar

    Actually the behaviour (403) is correct if the user is not project administrator. Only project admins can list people who are members of user groups.

    But AFAIR, there shouldn't be a need for the eclipse connector to do such a call. Hence the question of @nterray about the path the connector followed to have a need for this call.


    • Reported in version cleared values: 8.19
    User avatar
    last edited by: William Enright (ewilenr) 2017-03-27 21:49
    Gentle bump. This error is easily reproducible when refreshing an artifact or when attempting to create a new query. The API explorer on Tuleap.net does not specifiy whether this API call requires elevated access rights or not, so I'm not sure if this behavior is intentional. Regardless, I have a simple fix for the issue should this be deemed unnecessary info to display to the user.
    User avatar
    It would be interesting to know the path the connector took that led to this REST call. Furthermore is the behaviour always reproducible – blank state, get the artifact (no error), refresh the artifact (error).