mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
API CHANGE Removed deprecated methods related to CanCMS and CanCMSAdmin which are now removed from the Group class in favour of the Permission system
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@64332 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
817d8f8f45
commit
d66ee2f738
@ -224,29 +224,6 @@ class LeftAndMain extends Controller {
|
||||
$this->extend('augmentInit', $dummy);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the current user can access the CMS
|
||||
*/
|
||||
function canAccessCMS() {
|
||||
|
||||
$member = Member::currentUser();
|
||||
|
||||
if($member) {
|
||||
if($groups = $member->Groups()) {
|
||||
foreach($groups as $group) if($group->CanCMS) return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the current user has administrative rights in the CMS
|
||||
*/
|
||||
function canAdminCMS() {
|
||||
if($member = Member::currentUser()) return $member->isAdmin();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------//
|
||||
// Main controllers
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user