Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
justinfreeman (Agileware)
Core
Commits
41f314b6
Commit
41f314b6
authored
11 years ago
by
Kurund Jalmi
Browse files
Options
Downloads
Patches
Plain Diff
whitespace fixes
parent
58ae076c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Core/Permission.php
+17
-15
17 additions, 15 deletions
CRM/Core/Permission.php
with
17 additions
and
15 deletions
CRM/Core/Permission.php
+
17
−
15
View file @
41f314b6
...
...
@@ -70,7 +70,7 @@ class CRM_Core_Permission {
*/
public
static
function
getPermission
()
{
$config
=
CRM_Core_Config
::
singleton
();
return
$config
->
userPermissionClass
->
getPermission
(
);
return
$config
->
userPermissionClass
->
getPermission
();
}
/**
...
...
@@ -84,7 +84,7 @@ class CRM_Core_Permission {
*/
static
function
check
(
$str
)
{
$config
=
CRM_Core_Config
::
singleton
();
return
$config
->
userPermissionClass
->
check
(
$str
);
return
$config
->
userPermissionClass
->
check
(
$str
);
}
/**
...
...
@@ -113,7 +113,7 @@ class CRM_Core_Permission {
*/
static
function
checkGroupRole
(
$array
)
{
$config
=
CRM_Core_Config
::
singleton
();
return
$config
->
userPermissionClass
->
checkGroupRole
(
$array
);
return
$config
->
userPermissionClass
->
checkGroupRole
(
$array
);
}
/**
...
...
@@ -128,7 +128,7 @@ class CRM_Core_Permission {
*/
public
static
function
getPermissionedStaticGroupClause
(
$type
,
&
$tables
,
&
$whereTables
)
{
$config
=
CRM_Core_Config
::
singleton
();
return
$config
->
userPermissionClass
->
getPermissionedStaticGroupClause
(
$type
,
$tables
,
$whereTables
);
return
$config
->
userPermissionClass
->
getPermissionedStaticGroupClause
(
$type
,
$tables
,
$whereTables
);
}
/**
...
...
@@ -146,7 +146,7 @@ class CRM_Core_Permission {
*/
public
static
function
group
(
$groupType
,
$excludeHidden
=
TRUE
)
{
$config
=
CRM_Core_Config
::
singleton
();
return
$config
->
userPermissionClass
->
group
(
$groupType
,
$excludeHidden
);
return
$config
->
userPermissionClass
->
group
(
$groupType
,
$excludeHidden
);
}
public
static
function
customGroupAdmin
()
{
...
...
@@ -173,7 +173,8 @@ class CRM_Core_Permission {
}
public
static
function
customGroup
(
$type
=
CRM_Core_Permission
::
VIEW
,
$reset
=
FALSE
)
{
$customGroups
=
CRM_Core_PseudoConstant
::
get
(
'CRM_Core_DAO_CustomField'
,
'custom_group_id'
,
array
(
'fresh'
=>
$reset
));
$customGroups
=
CRM_Core_PseudoConstant
::
get
(
'CRM_Core_DAO_CustomField'
,
'custom_group_id'
,
array
(
'fresh'
=>
$reset
));
$defaultGroups
=
array
();
// check if user has all powerful permission
...
...
@@ -279,9 +280,10 @@ class CRM_Core_Permission {
if
(
!
$eventID
)
{
return
$permissionedEvents
;
}
if
(
!
empty
(
$permissionedEvents
)){
if
(
!
empty
(
$permissionedEvents
))
{
return
array_search
(
$eventID
,
$permissionedEvents
)
===
FALSE
?
NULL
:
$eventID
;
}
else
{
}
else
{
return
$eventID
;
}
}
...
...
@@ -318,7 +320,7 @@ class CRM_Core_Permission {
/**
* check permissions for delete and edit actions
*
* @param string
$module component name.
* @param string $module component name.
* @param $action action to be check across component
*
**/
...
...
@@ -522,8 +524,9 @@ class CRM_Core_Permission {
$aclPermission
=
self
::
getPermission
();
if
(
in_array
(
$aclPermission
,
array
(
CRM_Core_Permission
::
EDIT
,
CRM_Core_Permission
::
VIEW
,
)))
{
CRM_Core_Permission
::
VIEW
,
))
)
{
return
TRUE
;
}
...
...
@@ -542,7 +545,7 @@ class CRM_Core_Permission {
/**
* Function to get component name from given permission.
*
* @param string
$permission
* @param string $permission
*
* return string $componentName the name of component.
* @static
...
...
@@ -584,7 +587,7 @@ class CRM_Core_Permission {
*/
public
static
function
permissionEmails
(
$permissionName
)
{
$config
=
CRM_Core_Config
::
singleton
();
return
$config
->
userPermissionClass
->
permissionEmails
(
$permissionName
);
return
$config
->
userPermissionClass
->
permissionEmails
(
$permissionName
);
}
/**
...
...
@@ -596,7 +599,7 @@ class CRM_Core_Permission {
*/
public
static
function
roleEmails
(
$roleName
)
{
$config
=
CRM_Core_Config
::
singleton
();
return
$config
->
userRoleClass
->
roleEmails
(
$roleName
);
return
$config
->
userRoleClass
->
roleEmails
(
$roleName
);
}
static
function
isMultisiteEnabled
()
{
...
...
@@ -605,4 +608,3 @@ class CRM_Core_Permission {
)
?
TRUE
:
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