Class: Yes::Auth::Principals::ReadResourceAccess

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/yes/auth/principals/read_resource_access.rb

Overview

Represents a read resource access record linking a principal to a role-based read permission.

Examples:

Checking if an access is complete

access = Yes::Auth::Principals::ReadResourceAccess.find(id)
access.authorization_complete?

Instance Method Summary collapse

Instance Method Details

#authorization_complete?Boolean

Returns whether all required fields are present for authorization.

Returns:

  • (Boolean)

    whether all required fields are present for authorization



17
18
19
# File 'lib/yes/auth/principals/read_resource_access.rb', line 17

def authorization_complete?
  service.present? && scope.present? && resource_type.present? && role.present? && resource_id.present?
end