logo

Member
Member
Offline Offline
Posts: 46
SVN: Non-admin given option to change admin panel layout

In the file LayoutsEditProfile.php, the line...

Code:

$body = theme('title', $EDITPROFILE_LANG["theme_title"]) . theme('start_content') . '<div id="editprofileLinks" class="editprofile-links" align="center">[&nbsp;<a id="editAccLink" class="text-link editprofile-link editprofile-account-link" href="'.$settings['site_url'].'/index.php?act=editaccount"><strong>' . str_replace(' ','&nbsp;',$EDITPROFILE_LANG["account_settings"]) . '</strong></a>&nbsp;] [&nbsp;<a id="editMiscLink" class="text-link editprofile-link editprofile-misc-link" href="'.$settings['site_url'].'/index.php?act=editmiscellaneous"><strong>' . str_replace(' ','&nbsp;',$EDITPROFILE_LANG["misc_settings"]) . '</strong></a>&nbsp;] [&nbsp;<a id="editLookLink" class="text-link editprofile-link editprofile-look-link" href="'.$settings['site_url'].'/index.php?act=editlook"><strong>' . str_replace(' ','&nbsp;',$EDITPROFILE_LANG["look_settings"]) . '</strong></a>&nbsp;]'.($user['admin_panel'] ? ' [&nbsp;<a id="editAdminLink" class="text-link editprofile-link editprofile-admin-link" href="'.$settings['site_url'].'/index.php?act=userpreferances"><strong>' . str_replace(' ','&nbsp;',$EDITPROFILE_LANG["user_settings"]) . '</strong></a>&nbsp;]' : '').'</div>';


...has this little bit here...

Code:

($user['admin_panel'] ? ' [&nbsp;<a id="editAdminLink" class="text-link editprofile-link editprofile-admin-link" href="'.$settings['site_url'].'/index.php?act=userpreferances"><strong>' . str_replace(' ','&nbsp;',$EDITPROFILE_LANG["user_settings"]) . '</strong></a>&nbsp;]' : '')


...which looks like it's only supposed to display if the user has access to the admin panel.

Upon creating a new user, and setting them as a "member" (sendmail isn't working, haven't looked into it yet) the member can see this in the edit profile page. If I read right, the idea is, only admins can see it.

My fix? I made my own admin panel layout, so simply removed it.

For readability purposes, may want to look into breaking that line up... a 1175 character line makes for slightly more difficult tweaking.
Last Edit: 17th September, 2009, 12:54:08 AM by FWishbringer
eoCMS Developer
eoCMS Developer
Offline Offline
avatar
Posts: 1527
Re: SVN: Non-admin given option to change admin panel layout

Could you test to make sure the "member" cant access the admin panel? Dont forget to include the authid in the URL when testing Wink

Because if it shows that, then that means admin_panel is set to true :S

Please do not PM me requesting support or anything, use the forums, thats what they are here for
eoCMS Developer
eoCMS Developer
Offline Offline
avatar
Posts: 1527
Re: SVN: Non-admin given option to change admin panel layout

TGPEG mark as fixed please

Please do not PM me requesting support or anything, use the forums, thats what they are here for
eoCMS Designer
eoCMS Designer
Offline Offline
avatar
Posts: 1290
tbarkass_willamson@hotmail.com
Re: SVN: Non-admin given option to change admin panel layout

This bug has been deemed [Fixed] by an eoCMS developer. If you dispute the Fix, please PM a developer, giving details of why. This topic can then be unlocked allowing for further discussion.

Seen a bug? Report it!

Jump to:


0.07 seconds Queries: 13