1<?php 2/** 3 * Copyright 2006-2017 Horde LLC (http://www.horde.org/) 4 * 5 * See the enclosed file COPYING for license information (LGPL). If you 6 * did not receive this file, see http://www.horde.org/licenses/lgpl21. 7 * 8 * @category Horde 9 * @package Perms 10 * @author Gunnar Wrobel <wrobel@pardus.de> 11 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 12 */ 13 14/** 15 * Maps a single Kolab_Storage user ACL element to the Horde permission system. 16 * 17 * @category Horde 18 * @package Perms 19 * @author Gunnar Wrobel <wrobel@pardus.de> 20 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 21 */ 22class Horde_Perms_Permission_Kolab_Acl_User 23extends Horde_Perms_Permission_Kolab_Acl 24{ 25 /** 26 * The user id. 27 * 28 * @var string 29 */ 30 protected $_id; 31 32 /** 33 * Constructor. 34 * 35 * @param string $acl The folder ACL element as provided by the driver. 36 * @param string $id The user id. 37 */ 38 public function __construct($acl, $id) 39 { 40 $this->_id = $id; 41 parent::__construct($acl); 42 } 43 44 /** 45 * Converts the ACL string to a Horde_Perms mask and stores it in the 46 * provided data array. 47 * 48 * @param array &$data The horde permission data. 49 */ 50 public function toHorde(array &$data) 51 { 52 $data['users'][$this->_id] = $this->convertAclToMask(); 53 } 54} 55