Strider-CD / strider-gitlab

Seamless integration between Strider and GitLab
25 stars 16 forks source link

Gitlab user permissions must be owner or master to add the project into strider #23

Open leutrimhusaj opened 9 years ago

leutrimhusaj commented 9 years ago

When we configure a gitlab account to import the projects into strider, it was possible in v1.0.7 that the gitlab user, which token is configured in strider has only guest access in his gitlab account. But in v1.1.0 the user now has to be owner or master of the group which projects are imported. Now there is an error: "results":[], "status":"error", "errors":[ {"code":500,"reason":"Failed to setup repo: undefined"} ]

Strider is receiving an 403 Forbidden from Gitlab when sending Api-Calls for creating the hooks and adding the Deployment Keys.

Is this correct that the user has to have this high access rights or isn't it possible with guest access too?

knownasilya commented 9 years ago

Not sure about gitlab, but in Bitbucket you need admin rights to add repos. @oliversalzburg do you have any thoughts?

oliversalzburg commented 9 years ago

This is probably identical to https://github.com/Strider-CD/strider/issues/803

The user must have the permissions to install the hooks and keys, otherwise the import will fail.

As I mentioned in the other ticket, I'm not sure how strider should behave here. It could ignore those permission errors, then the user could at least import the project and trigger test/deploy manually, or there should be a workflow to allow the user to register hooks and keys manually (so that someone with higher privileges on Gitlab can perform the task).

Given that the latter path would include implementing the former, I would propose that the error handling in these situations is relaxed and improved. Failing to register the hooks should not prevent the user from importing and the problem (and solution) needs to be made perfectly clear in the frontend UI.