class Tilia::DavAcl::Fs::File

This is an ACL-enabled file node.

Attributes

acl[RW]

A list of ACL rules.

@var array

owner[RW]

Owner uri, or null for no owner.

@var string|null

Public Class Methods

new(path, acl, owner = nil) click to toggle source

Constructor

@param string path on-disk path. @param array acl ACL rules. @param string|null owner principal owner string.

Calls superclass method Tilia::Dav::Fs::Node::new
# File lib/tilia/dav_acl/fs/file.rb, line 27
def initialize(path, acl, owner = nil)
  super(path)
  @acl = acl
  @owner = owner
end

Public Instance Methods

acl=(_acl) click to toggle source

Updates the ACL

This method will receive a list of new ACE's as an array argument.

@param array acl @return void

# File lib/tilia/dav_acl/fs/file.rb, line 67
def acl=(_acl)
  fail Dav::Exception::Forbidden, 'Setting ACL is not allowed here'
end
group() click to toggle source

Returns a group principal

This must be a url to a principal, or null if there's no owner

@return string|null

# File lib/tilia/dav_acl/fs/file.rb, line 45
def group
  nil
end
supported_privilege_set() click to toggle source

Returns the list of supported privileges for this node.

The returned data structure is a list of nested privileges. See Tilia::DavAcl::Plugin::getDefaultSupportedPrivilegeSet for a simple standard structure.

If null is returned from this method, the default privilege set is used, which is fine for most common usecases.

@return array|null

# File lib/tilia/dav_acl/fs/file.rb, line 81
def supported_privilege_set
  nil
end