-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't add more than one Role for same user using Grant-RsCatalogItemRole #102
Comments
Wasn't possible to add more than one Role for same user using Grant-RsCatalogItemRole
Thank you very much for the quick turnaround Claudio! |
…-RsCatalogItemRole (#103) * Fixes (#102) the ability to give more than one Role to an user Wasn't possible to add more than one Role for same user using Grant-RsCatalogItemRole * New test - Adding more than one Role to the same user/CatalogItem Grant Browser Permission and then add grant Content Manager. It should keep both. AfterAll remove them. * Add $script scope to the variable on AfterAll * Fix variable name * Removed AfterAll block
I was still getting this error:
The reason was if you specify the Identity as "User" it will work for the first call however it converts the Identity to "SERVER_NAME\User" on second run it does not pickup the fact that the Identity already exists and produces the same error. No sure if there should be a warning about this or if the module should be modified to check for SERVER_NAME\ prefix and if it does not exist then add it. |
I am on 0.0.4.9, Was it fixed as part of this version? I am still getting this error while adding more than one role for same user: Error occurred while granting System User to xxxx! Exception calling "SetSystemPolicies" with "1" argument(s): |
No new changes have been submitted in that area |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
It gives an error when we try to add a 2nd role to an existing user.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Create new folder
New-RsFolder -ReportServerUri $reportServerUri -RsFolder "/" -FolderName "Folder"
Grant permissions - Works correctly
Grant-RsCatalogItemRole -ReportServerUri $reportServerUri -Path "/Folder" -RoleName 'Browser' -Identity "User"
When try to run the following - will fail
Grant-RsCatalogItemRole -ReportServerUri $reportServerUri -Path "/Folder" -RoleName 'Browser' -Identity "User"
What is the expected behavior?
That the new Role is appended to the existing ones.
Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?
PowerShell v5.0
Windows 10
Not that I'm aware of.
Notes
I have and will submit a fix.
The text was updated successfully, but these errors were encountered: