\OCPISubAdminManager

Sub admin manager

Summary

Methods
Constants
createSubAdmin()
deleteSubAdmin()
getSubAdminsGroups()
getGroupsSubAdmins()
getAllSubAdmins()
isSubAdminofGroup()
isSubAdmin()
isUserAccessible()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

createSubAdmin()

createSubAdmin(\OCP\IUser  $user, \OCP\IGroup  $group) : boolean

Make the given user a SubAdmin of the given group.

Parameters

\OCP\IUser $user

user to be SubAdmin

\OCP\IGroup $group

group $user becomes subadmin of

Returns

boolean —

true if success, false otherwise

deleteSubAdmin()

deleteSubAdmin(\OCP\IUser  $user, \OCP\IGroup  $group) : boolean

Remove subadmin permission of the given user for the given group.

Parameters

\OCP\IUser $user

the user that is the SubAdmin

\OCP\IGroup $group

the group

Returns

boolean —

true if success, false otherwise

getSubAdminsGroups()

getSubAdminsGroups(\OCP\IUser  $user) : array<mixed,\OCP\IGroup>

Returns groups managed by the given subadmin

Parameters

\OCP\IUser $user

the SubAdmin

Returns

array<mixed,\OCP\IGroup> —

list of groups

getGroupsSubAdmins()

getGroupsSubAdmins(\OCP\IGroup  $group) : array<mixed,\OCP\IUser>

Returns SubAdmins of a group

Parameters

\OCP\IGroup $group

the group

Returns

array<mixed,\OCP\IUser> —

list of users who are subadmin

getAllSubAdmins()

getAllSubAdmins() : array

Returns all SubAdmins

Returns

array —

list of subadmin users

isSubAdminofGroup()

isSubAdminofGroup(\OCP\IUser  $user, \OCP\IGroup  $group) : boolean

Checks whether a user is a SubAdmin of the given group

Parameters

\OCP\IUser $user

user to check

\OCP\IGroup $group

group to check

Returns

boolean —

true if the given user is a subadmin of the group, false otherwise

isSubAdmin()

isSubAdmin(\OCP\IUser  $user) : boolean

Checks whether a user is a of at least one group

Parameters

\OCP\IUser $user

Returns

boolean —

true if the given user is subadmin of at least one group, false otherwise

isUserAccessible()

isUserAccessible(\OCP\IUser  $subadmin, \OCP\IUser  $user) : boolean

Checks whether a user is a accessible by a subadmin

Parameters

\OCP\IUser $subadmin

subadmin user

\OCP\IUser $user

user to check

Returns

boolean —

true if accessible, false otherwise