projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db3604a
)
DataObjects/Core_person_settings.php
author
Edward
<edward@roojs.com>
Wed, 3 Apr 2019 05:44:22 +0000
(13:44 +0800)
committer
Edward
<edward@roojs.com>
Wed, 3 Apr 2019 05:44:22 +0000
(13:44 +0800)
DataObjects/Core_person_settings.php
patch
|
blob
|
history
diff --git
a/DataObjects/Core_person_settings.php
b/DataObjects/Core_person_settings.php
index
dea40bd
..
616015b
100644
(file)
--- a/
DataObjects/Core_person_settings.php
+++ b/
DataObjects/Core_person_settings.php
@@
-20,10
+20,7
@@
class Pman_Core_DataObjects_Core_person_settings extends DB_DataObject
function beforeInsert($q, $roo)
{
- if(
- !$roo->authUser ||
- (!empty($this->person_id) && $this->person_id != $roo->authUser->id)
- ) {
+ if(!$this->hasPermission($roo)) {
$roo->jerr('Access Dennied');
}
@@
-51,10
+48,7
@@
class Pman_Core_DataObjects_Core_person_settings extends DB_DataObject
function beforeDelete($dependants_array, $roo)
{
- if(
- !$roo->authUser ||
- (!empty($this->person_id) && $this->person_id != $roo->authUser->id)
- ) {
+ if(!$this->hasPermission($roo)) {
$roo->jerr('Access Dennied');
}
}