-
Notifications
You must be signed in to change notification settings - Fork 66
XDMP-MUSTHAVEUPDATE when deploying modules with account that doesnt have admin role #514
Comments
I would probably have run into this when working on #438, but I think you are right. Non-admins must always add an update permission. Whether that should be for the app-role, not sure. And no worries, thanks for the suggested fix. That makes looking for the root cause much easier.. |
Hi Geert, I got a "proper" fix and I will submit a pull request shortly... |
Pull request submitted with a proper fix: #517 |
Hi, ran a test with your code fix, but a) don't know what kind of roles/privs you assigned to that twitter-role, b) could it be that you are running a non-rest project? Otherwise I am pretty sure that line will get skipped because permissions are passed in from elsewhere.. |
Just checked: app-type is set to rest in my build.properties file. That doesn't appear to be overwritten anywhere. (Are there other conditions that could cause it to be deployed differently?) twitter-role is app-name-role . Only unprotected-collections privilege has been added to Roxy default privs for it. While this is from my local test case, my client was experiencing the exact same issue using app-type rest with a fresh pull from the latest dev branch. My fix also worked for him. We created a new user and assign them only app-name-role and then attempt to deploy as that user. We then added rest-admin role to that user. We then added unprotected-collections to the app-name-role. Happy to provide any other info that could be helpful. |
I can help test as well, as I'm the client experiencing the issue. |
Thnx, this helps. I was trying to reproduce without adding roles. But looks like deploy of rest artifacts doesnt work well without the rest-admin role.. |
Debugged the issue. Deploy user indeed has to have rest-admin role to be able to successfully deploy rest artifacts. That makes kind of sense, but we prefer using privileges instead of roles, and therefore assign app-role permissions only to modules. Installation of rest artifacts however is done through the rest api, and get rest-style permissions. We typically overwrite those permissions afterwards. |
Update to allow non-admin users to deploy.
@grtjn what's the status of this one? |
…community#518 Update to allow non-admin users to deploy.
Closing as multiple PRs have been accepted to fix this |
Hi,
Whenever I try to deploy modules with an account that's not admin I get the error XDMP-MUSTHAVEUPDATE
I added this to line 231 of xcc.rb to make the error go away:
I have never written a single line of Ruby in my life before today so I apologize for not writing a proper fix as I was in a pinch to get this working for a customer. I've also tested this on a completely brand new roxy project to make sure that I didn't have any settings that were not default.
The text was updated successfully, but these errors were encountered: