Class: ActiveCMIS::AclEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/active_cmis/acl_entry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(principal, permissions, direct) ⇒ AclEntry

Returns a new instance of AclEntry.

Parameters:

  • permissions (<String>)

    A list of permissions, valid values depend on the repository



5
6
7
8
9
10
# File 'lib/active_cmis/acl_entry.rb', line 5

def initialize(principal, permissions, direct)
  @principal = principal.freeze
  @permissions = permissions.freeze
  @permissions.each {|p| p.freeze}
  @direct = direct
end

Instance Attribute Details

#permissions<String> (readonly)

Returns A frozen array of strings with the permissions.

Returns:

  • (<String>)

    A frozen array of strings with the permissions



19
20
21
# File 'lib/active_cmis/acl_entry.rb', line 19

def permissions
  @permissions
end

#principalString, ... (readonly)

Normal users are represented with a string, a non-logged in user is known as :anonymous, the principal :world represents the group of all logged in users.

Returns:

  • (String, :world, :anonymous)


17
18
19
# File 'lib/active_cmis/acl_entry.rb', line 17

def principal
  @principal
end

Instance Method Details

#direct?Boolean

True if this is the direct representation of the ACL from the repositories point of view. This means there are no hidden differences that can’t be expressed within the limitations of CMIS

Returns:

  • (Boolean)


22
23
24
# File 'lib/active_cmis/acl_entry.rb', line 22

def direct?
  @direct
end