mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
added a call to magic method to check extra (crm) permission
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@61578 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
eea6cf978d
commit
a009cf5341
@ -168,7 +168,14 @@ abstract class ModelAdmin extends LeftAndMain {
|
||||
$models = $this->getManagedModels();
|
||||
$modelMap = array();
|
||||
foreach($models as $modelName) {
|
||||
if(singleton($modelName)->canCreate(Member::currentUser())) $modelMap[$modelName] = singleton($modelName)->singular_name();
|
||||
if ($this->hasMethod('alternatePermissionCheck')) {
|
||||
if ($this->alternatePermissionCheck()) {
|
||||
$modelMap[$modelName] = singleton($modelName)->singular_name();
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(singleton($modelName)->canCreate(Member::currentUser())) $modelMap[$modelName] = singleton($modelName)->singular_name();
|
||||
}
|
||||
}
|
||||
|
||||
$form = new Form(
|
||||
|
Loading…
Reference in New Issue
Block a user