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
d6829026
Commit
d6829026
authored
11 years ago
by
Kurund Jalmi
Browse files
Options
Downloads
Plain Diff
Merge pull request #1190 from davecivicrm/CRM-10935
CRM-10935
parents
b07e67c0
1795d03b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CRM/Contact/BAO/Contact/Permission.php
+1
-1
1 addition, 1 deletion
CRM/Contact/BAO/Contact/Permission.php
CRM/Contact/Form/Contact.php
+1
-3
1 addition, 3 deletions
CRM/Contact/Form/Contact.php
CRM/Contact/Page/View.php
+2
-4
2 additions, 4 deletions
CRM/Contact/Page/View.php
with
4 additions
and
8 deletions
CRM/Contact/BAO/Contact/Permission.php
+
1
−
1
View file @
d6829026
...
...
@@ -252,7 +252,7 @@ AND $operationClause LIMIT 1";
return
FALSE
;
}
}
if
(
$contactID
==
$selectedContactID
)
{
if
(
$contactID
==
$selectedContactID
&&
CRM_Core_Permission
::
check
(
'edit my contact'
)
)
{
return
TRUE
;
}
else
{
...
...
This diff is collapsed.
Click to expand it.
CRM/Contact/Form/Contact.php
+
1
−
3
View file @
d6829026
...
...
@@ -206,9 +206,7 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form {
// check for permissions
$session
=
CRM_Core_Session
::
singleton
();
if
(
$session
->
get
(
'userID'
)
!=
$this
->
_contactId
&&
!
CRM_Contact_BAO_Contact_Permission
::
allow
(
$this
->
_contactId
,
CRM_Core_Permission
::
EDIT
)
)
{
if
(
!
CRM_Contact_BAO_Contact_Permission
::
allow
(
$this
->
_contactId
,
CRM_Core_Permission
::
EDIT
))
{
CRM_Core_Error
::
statusBounce
(
ts
(
'You do not have the necessary permission to edit this contact.'
));
}
...
...
This diff is collapsed.
Click to expand it.
CRM/Contact/Page/View.php
+
2
−
4
View file @
d6829026
...
...
@@ -203,9 +203,7 @@ class CRM_Contact_Page_View extends CRM_Core_Page {
'isDeleted'
=>
$isDeleted
,
);
if
((
$session
->
get
(
'userID'
)
==
$this
->
_contactId
)
||
CRM_Contact_BAO_Contact_Permission
::
allow
(
$this
->
_contactId
,
CRM_Core_Permission
::
EDIT
)
)
{
if
(
CRM_Contact_BAO_Contact_Permission
::
allow
(
$this
->
_contactId
,
CRM_Core_Permission
::
EDIT
))
{
$recentOther
[
'editUrl'
]
=
CRM_Utils_System
::
url
(
'civicrm/contact/add'
,
"reset=1&action=update&cid=
{
$this
->
_contactId
}
"
);
}
...
...
@@ -286,7 +284,7 @@ class CRM_Contact_Page_View extends CRM_Core_Page {
// things easier in dashboard
$session
=
CRM_Core_Session
::
singleton
();
if
(
$session
->
get
(
'userID'
)
==
$contactID
)
{
if
(
$session
->
get
(
'userID'
)
==
$contactID
&&
CRM_Core_Permission
::
check
(
'edit my contact'
)
)
{
$page
->
assign
(
'permission'
,
'edit'
);
$page
->
_permission
=
CRM_Core_Permission
::
EDIT
;
// deleted contacts’ stuff should be (at best) only viewable
...
...
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