Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
Tz Tools
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
d156e2e7
authored
2010-03-12 15:37:29 +0000
by
Chris Boden
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Changed how determening if is administrator; pervious was was only for MU. refs #552
1 parent
562c32d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
com/PagePermissions/PagePermissions.php
com/PagePermissions/PagePermissions.php
View file @
d156e2e
...
...
@@ -48,7 +48,7 @@ class PagePermissions {
}
// Anyone has access, God has no limitations
if
(
$data
[
self
::
ELE_SEL
]
==
self
::
OPT_ALL
||
is_site
_admin
())
{
if
(
$data
[
self
::
ELE_SEL
]
==
self
::
OPT_ALL
||
self
::
is
_admin
())
{
return
true
;
}
...
...
@@ -99,6 +99,10 @@ class PagePermissions {
return
$user_role
;
}
public
static
function
is_admin
(
$user
=
false
)
{
return
(
self
::
get_user_role
(
$user
)
==
'administrator'
?
true
:
false
);
}
public
static
function
getFieldNames
()
{
static
$fields
=
false
;
if
(
false
!==
$fields
)
{
...
...
Please
register
or
sign in
to post a comment