subadminfactory.php 1001 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * @author Lukas Reschke
  4. * @copyright 2015 Lukas Reschke lukas@owncloud.com
  5. *
  6. * This file is licensed under the Affero General Public License version 3 or
  7. * later.
  8. * See the COPYING-README file.
  9. */
  10. namespace OC\Settings\Factory;
  11. /**
  12. * @package OC\Settings\Factory
  13. */
  14. class SubAdminFactory {
  15. /**
  16. * Get the groups $uid is SubAdmin of
  17. * @param string $uid
  18. * @return array Array of groups that $uid is subadmin of
  19. */
  20. function getSubAdminsOfGroups($uid) {
  21. return \OC_SubAdmin::getSubAdminsGroups($uid);
  22. }
  23. /**
  24. * Whether the $group is accessible to $uid as subadmin
  25. * @param string $uid
  26. * @param string $group
  27. * @return bool
  28. */
  29. function isGroupAccessible($uid, $group) {
  30. return \OC_SubAdmin::isGroupAccessible($uid, $group);
  31. }
  32. /**
  33. * Whether $uid is accessible to $subAdmin
  34. * @param string $subAdmin
  35. * @param string $uid
  36. * @return bool
  37. */
  38. function isUserAccessible($subAdmin, $uid) {
  39. return \OC_SubAdmin::isUserAccessible($subAdmin, $uid);
  40. }
  41. }