lib/rbac/policies.rb
# delete all policies that contains the role.
delete all policies that contains the role.
delete all policies that contains the role .
def delete_policy(role)
      RBAC::Service.call(RBACApiClient::PolicyApi) do |api_instance|
        RBAC::Service.paginate(api_instance, :list_policies, :name => @prefix).each do |policy|
          api_instance.delete_policy(policy.uuid) if policy.roles.map(&:uuid).include?(role.uuid)
        end
      end
    end
def delete_policy ( role ) RBAC :: Service . call ( RBACApiClient :: PolicyApi ) do | api_instance | RBAC :: Service . paginate ( api_instance , :list_policies , :name => @prefix ) . each do | policy | api_instance . delete_policy ( policy . uuid ) if policy . roles . map ( & :uuid ) . include? ( role . uuid ) end end end
delete all policies that contains the role.
delete all policies that contains the role .
role
<not_specific>