[2011-10-17] admin/myprofile link broken for members with restricted access #334

Closed
silverstripe-issues opened this Issue Apr 3, 2013 · 4 comments

Projects

None yet

2 participants

@silverstripe-issues

created by: @schellmax (schellmax)
created at: 2011-10-17
original ticket: http://open.silverstripe.org/ticket/6742


for members without access to the 'pages' section of the cms (i.e. working with some modeladmin only), the 'Profile' link at the bottom bar in the cms is broken ('admin/myprofile').

this is due to a check in the 'canView' method of LeftAndMain.php, returning false in case you don't have a "CMS_ACESS_LeftAndMain" permission (section starting with comment '// Default security check').

a quick fix is inserting the following lines before this:

$params = Director::urlParams();
if($params['Controller'] == 'CMSMain' && $params['Action'] == 'myprofile') return true;
@silverstripe-issues

comment by: @schellmax (schellmax)
created at: 2011-10-17


for an example screenshot see http://www.silverstripe.org/customising-the-cms/show/15537

@silverstripe-issues

comment by: @chillu (ischommer)
created at: 2011-10-18


Unsetting milestone

@silverstripe-issues

comment by: Simon
created at: 2011-12-12


To make it possible to let users to actually save the changes, the following line needs to be added as well, above the actual permission checker:

if($params['Controller'] == 'CMSMain' && $params['Action'] == 'Member_ProfileForm') return true;
@simonwelsh simonwelsh closed this Mar 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment