Skip to content
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

PermissionTarget fails when updating group-based targets #112

Open
matt-rean opened this issue May 27, 2019 · 0 comments
Open

PermissionTarget fails when updating group-based targets #112

matt-rean opened this issue May 27, 2019 · 0 comments
Labels
Status: Untriaged An issue that has yet to be triaged.

Comments

@matt-rean
Copy link

Version:

2.8.2

Environment:

RHEL7

Scenario:

When attempting to update an existing permissions target with no user in the principal, the gem fails with an exception. I believe it's failing because the user portion of the principal is nil and abbreviate_principal is expecting it. This could cause a variety of issues since principal is not a required field in the PermissionTarget api, but the gem always uses it.

Steps to Reproduce:

Create a permission target with permissions assigned only by group, with no users. Attempt to update the repository list on the permissions target.

Expected Result:

The permissions target should update with the configuration parameters passed in to the request.

Actual Result:

NoMethodError: undefined method map' for nil:NilClass /home/ec2-user/.rvm/gems/ruby-2.4.2/gems/artifactory-2.8.2/lib/artifactory/resources/permission_target.rb:116:in abbreviate_principal'
/home/ec2-user/.rvm/gems/ruby-2.4.2/gems/artifactory-2.8.2/lib/artifactory/resources/permission_target.rb:96:in to_abbreviated' /home/ec2-user/.rvm/gems/ruby-2.4.2/gems/artifactory-2.8.2/lib/artifactory/resources/permission_target.rb:151:in save'
/opt/scratch/src/platform-bootstrap-omnibus/rakelib/bug.rake:10:in block (2 levels) in <top (required)>' /home/ec2-user/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in eval'
/home/ec2-user/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in `

'

Thank you!

@matt-rean matt-rean added the Status: Untriaged An issue that has yet to be triaged. label May 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Untriaged An issue that has yet to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant