Welcome to mirror list, hosted at ThFree Co, Russian Federation.

subadminfactory.php « factory « settings - github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 12a45527ae159a2972968c67540ddddd2b25f643 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
 * @author Lukas Reschke
 * @copyright 2015 Lukas Reschke lukas@owncloud.com
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 * See the COPYING-README file.
 */

namespace OC\Settings\Factory;

/**
 * @package OC\Settings\Factory
 */
class SubAdminFactory {
	/**
	 * Get the groups $uid is SubAdmin of
	 * @param string $uid
	 * @return array Array of groups that $uid is subadmin of
	 */
	function getSubAdminsOfGroups($uid) {
		return \OC_SubAdmin::getSubAdminsGroups($uid);
	}

	/**
	 * Whether the $group is accessible to $uid as subadmin
	 * @param string $uid
	 * @param string $group
	 * @return bool
	 */
	function isGroupAccessible($uid, $group) {
		return \OC_SubAdmin::isGroupAccessible($uid, $group);
	}

	/**
	 * Whether $uid is accessible to $subAdmin
	 * @param string $subAdmin
	 * @param string $uid
	 * @return bool
	 */
	function isUserAccessible($subAdmin, $uid) {
		return \OC_SubAdmin::isUserAccessible($subAdmin, $uid);
	}
}