Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
05bc5412
Commit
05bc5412
authored
12 years ago
by
Georg Ehrke
Browse files
Options
Downloads
Patches
Plain Diff
add some doc for lib/subadmin.php
parent
2fc83423
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/subadmin.php
+14
-1
14 additions, 1 deletion
lib/subadmin.php
with
14 additions
and
1 deletion
lib/subadmin.php
+
14
−
1
View file @
05bc5412
...
...
@@ -101,7 +101,9 @@ class OC_SubAdmin{
/**
* @brief checks if a user is a SubAdmin of a group
* @return array
* @param $uid uid of the subadmin
* @param $gid gid of the group
* @return bool
*/
public
static
function
isSubAdminofGroup
(
$uid
,
$gid
){
$stmt
=
OC_DB
::
prepare
(
'SELECT COUNT(*) as count FROM *PREFIX*group_admin where uid = ? AND gid = ?'
);
...
...
@@ -113,6 +115,11 @@ class OC_SubAdmin{
return
false
;
}
/**
* @brief checks if a user is a SubAdmin
* @param $uid uid of the subadmin
* @return bool
*/
public
static
function
isSubAdmin
(
$uid
){
$stmt
=
OC_DB
::
prepare
(
'SELECT COUNT(*) as count FROM *PREFIX*group_admin WHERE uid = ?'
);
$result
=
$stmt
->
execute
(
array
(
$uid
));
...
...
@@ -123,6 +130,12 @@ class OC_SubAdmin{
return
false
;
}
/**
* @brief checks if a user is a accessible by a subadmin
* @param $subadmin uid of the subadmin
* @param $user uid of the user
* @return bool
*/
public
static
function
isUserAccessible
(
$subadmin
,
$user
){
if
(
!
self
::
isSubAdmin
(
$subadmin
)){
return
false
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment