mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
Added CRUD settings to allow non-admin CMS users to use parts of the dmx module.
This commit is contained in:
parent
2c96aada8a
commit
3276320234
@ -35,6 +35,28 @@ class DMSDocument extends DataObject implements DMSDocumentInterface {
|
|||||||
static $singular_name = 'Document';
|
static $singular_name = 'Document';
|
||||||
|
|
||||||
static $plural_name = 'Documents';
|
static $plural_name = 'Documents';
|
||||||
|
|
||||||
|
|
||||||
|
public function canView($member = null) {
|
||||||
|
if($member == null) $member = Member::currentUser();
|
||||||
|
|
||||||
|
if($member->ID){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
public function canEdit($member = null) {
|
||||||
|
return $this->canView();
|
||||||
|
}
|
||||||
|
public function canCreate($member = null) {
|
||||||
|
return $this->canView();
|
||||||
|
}
|
||||||
|
public function canDelete($member = null) {
|
||||||
|
return $this->canView();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Associates this document with a Page. This method does nothing if the association already exists.
|
* Associates this document with a Page. This method does nothing if the association already exists.
|
||||||
|
Loading…
Reference in New Issue
Block a user