class Tilia::CalDav::Schedule::Outbox
The CalDAV scheduling outbox
The outbox is mainly used as an endpoint in the tree for a client to do free-busy requests. This functionality is completely handled by the Scheduling plugin, so this object is actually mostly static.
Public Class Methods
Constructor
@param string principal_uri
# File lib/tilia/cal_dav/schedule/outbox.rb, line 21 def initialize(principal_uri) @principal_uri = principal_uri end
Public Instance Methods
Returns a list of ACE's for this node.
Each ACE has the following properties:
* 'privilege', a string such as {DAV:}read or {DAV:}write. These are currently the only supported privileges * 'principal', a url to the principal who owns the node * 'protected' (optional), indicating that this ACE is not allowed to be updated.
@return array
# File lib/tilia/cal_dav/schedule/outbox.rb, line 69 def acl [ { 'privilege' => "{#{Plugin::NS_CALDAV}}schedule-query-freebusy", 'principal' => owner, 'protected' => true }, { 'privilege' => "{#{Plugin::NS_CALDAV}}schedule-post-vevent", 'principal' => owner, 'protected' => true }, { 'privilege' => '{DAV:}read', 'principal' => owner, 'protected' => true }, { 'privilege' => "{#{Plugin::NS_CALDAV}}schedule-query-freebusy", 'principal' => owner + '/calendar-proxy-write', 'protected' => true }, { 'privilege' => "{#{Plugin::NS_CALDAV}}schedule-post-vevent", 'principal' => owner + '/calendar-proxy-write', 'protected' => true }, { 'privilege' => '{DAV:}read', 'principal' => owner + '/calendar-proxy-read', 'protected' => true }, { 'privilege' => '{DAV:}read', 'principal' => owner + '/calendar-proxy-write', 'protected' => true } ] end
Updates the ACL
This method will receive a list of new ACE's.
@param array acl @return void
# File lib/tilia/cal_dav/schedule/outbox.rb, line 115 def acl=(_acl) fail Dav::Exception::MethodNotAllowed, 'You\'re not allowed to update the ACL' end
Returns an array with all the child nodes
@return SabreDAVINode[]
# File lib/tilia/cal_dav/schedule/outbox.rb, line 37 def children [] end
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/cal_dav/schedule/outbox.rb, line 55 def group nil end
Returns the name of the node.
This is used to generate the url.
@return string
# File lib/tilia/cal_dav/schedule/outbox.rb, line 30 def name 'outbox' end
Returns the owner principal
This must be a url to a principal, or null if there's no owner
@return string|null
# File lib/tilia/cal_dav/schedule/outbox.rb, line 46 def owner @principal_uri end
Returns the list of supported privileges for this node.
The returned data structure is a list of nested privileges. See SabreDAVACLPlugin::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/cal_dav/schedule/outbox.rb, line 129 def supported_privilege_set default = DavAcl::Plugin.default_supported_privilege_set default['aggregates'] << { 'privilege' => "{#{Plugin::NS_CALDAV}}schedule-query-freebusy" } default['aggregates'] << { 'privilege' => "{#{Plugin::NS_CALDAV}}schedule-post-vevent" } default end