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

Add RBAC for virtual attributes in API #15145

Merged
merged 2 commits into from
Jun 14, 2017

Commits on Jun 7, 2017

  1. Add RBAC check for virtual attributes

    Virtual attributes are passed to API thru ‘attributes’ parameter and it can be:
    - direct association
    e.g. attributes=vms (plural associations - collection)
    e.g. attributes=parent_manage (belongs_to association)
    
    /api/providers/2?attributes=parent_manages,vms
    
    - indirect association
    e.g. attributes=parent_manager.cloud_tenants (plural associations - collection)
    e.g. attributes=parent_manager.host (belongs_to association)
    
    localhost:3000/api/providers/2?attributes=parent_manager.host, parent_manager.cloud_tenants
    
    This RBAC situation is covered by method virtual_attribute_search(resource, attribute)
    where attribute can be has_many association or belongs_to (There are different RBAC check)
    
    it can also pure class as MiqRequestWorkflow (last if-else leg)
    lpichler committed Jun 7, 2017
    Configuration menu
    Copy the full SHA
    75f0552 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0d479b1 View commit details
    Browse the repository at this point in the history