mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Merge pull request #121 from halkyon/permission_fixes_non_admin
BUG Fixing non-ADMIN permission to view SubmittedForm/SubmittedFormField
This commit is contained in:
commit
869d457417
@ -70,6 +70,33 @@ class SubmittedForm extends DataObject {
|
||||
return $fields;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Member
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function canView($member = null) {
|
||||
return $this->Parent()->canView();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Member
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function canEdit($member = null) {
|
||||
return $this->Parent()->canEdit();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Member
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function canDelete($member = null) {
|
||||
return $this->Parent()->canDelete();
|
||||
}
|
||||
|
||||
/**
|
||||
* Before we delete this form make sure we delete all the
|
||||
* field values so that we don't leave old data round
|
||||
@ -85,4 +112,4 @@ class SubmittedForm extends DataObject {
|
||||
|
||||
parent::onBeforeDelete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,33 @@ class SubmittedFormField extends DataObject {
|
||||
'FormattedValue' => 'Value'
|
||||
);
|
||||
|
||||
/**
|
||||
* @param Member
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function canView($member = null) {
|
||||
return $this->Parent()->canView();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Member
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function canEdit($member = null) {
|
||||
return $this->Parent()->canEdit();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Member
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function canDelete($member = null) {
|
||||
return $this->Parent()->canDelete();
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a formatted value for the reports and email notifications.
|
||||
* Converts new lines (which are stored in the database text field) as
|
||||
|
Loading…
Reference in New Issue
Block a user