Forums / Developer / Different starting points in admin interface?

Different starting points in admin interface?

Author Message

Nicklas Lundgren

Friday 27 May 2005 4:10:05 am

Hi all,
Does anyone know if it is possible to change the starting point of the admin-interface based on a user-role policy?
We are planning to set up a site with a lot of different userrights. And we would like to make sure that a person with editing permissions to a certain area of the site gets to this area immediately when logging in to the admin interface.

Best regards,
/Nicklas Lundgren

Nicklas Lundgren, Managing Director
Novitell AB, Sweden

Lex 007

Friday 27 May 2005 7:36:09 am

Hi

I think you can do that with several site accesses, that each have a different root node (this parameter should be in the site.ini)

Lex

Nicklas Lundgren

Sunday 29 May 2005 8:44:45 am

Thanks Lex007,

I have already tried that, and it does work to set different starting points with different siteaccesses. However, I would like to keep it down to one siteaccess but still have different starting points based on user-rights. But maybe its not possible?

Nicklas Lundgren, Managing Director
Novitell AB, Sweden

kracker (the)

Sunday 29 May 2005 11:48:59 am

Snazzy Idea,

I think your going to want to create a user class with a sort of attribute that contains the path to the default root / index variables (perhaps two attributes).

The goal is to move the abstraction of these site.ini variables to a higher level of abstraction.

I think is going to require some changes to a few key internal places inside eZ publish (kernel hacking / extension), specificaly the user kernel class / authentication functions which use these variables.

IndexPage=/content/view/full/2/
DefaultPage=/content/view/full/2/

//kracker
<i>korn : leave this place</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

kracker (the)

Sunday 29 May 2005 11:57:28 am

Specifically,

You will want to look (as I have for you) at this directory: <i>kernel/user/</i>

And again at this file specifically: <i>kernel/user/login.php</i>

At this specific chunk of code (<b>search</b> for it):

$redirectionURI = $userRedirectURI;
if ( $redirectionURI == '' )
$redirectionURI = $ini->variable( 'SiteSettings', 'DefaultPage' );

I have this idea that If you were to replace the ini variable reference with a call to your current user's class attribute by the same name you could achieve your short-term goal.

This is kernel hacking of course so it is not the most long term efficient way of implementing this change long-term.

Still it does give you a specific idea on what code you must <i>override</i> with your extension.

//kracker
<i>korn : here to stay (remix)</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

kracker (the)

Sunday 29 May 2005 12:12:41 pm

If you are looking to do it right ..

These are the nodes which you must assimilate first. With a little reading and practice with the hello world example you too can create an eZ publish extension.

<i>http://www.ez.no/ez_publish/documentation/development/extensions
http://www.ez.no/ez_publish/documentation/development/extensions/module/hello_world
http://www.ez.no/ez_publish/documentation/development/extensions/module
http://www.ez.no/ez_publish/documentation/development/extensions/module/module_tutorial_part_1
http://www.ez.no/ez_publish/documentation/development/extensions/building_an_ez_publish_module
http://www.ez.no/ez_publish/documentation/installation/adding_extensions
http://www.ez.no/ez_publish/documentation/development/kernel</i>

The #1 reason to develop this functionality is without using an extension you loose your changes to the eZ publish kernel when you need to upgrade eZ publish.

If you put this logic into an extension (which is relatively simple to do) you don't have to worry about upgrades at all, your protected !)

Alternately, if you create an extension and eZ package of your user class you can <b>contribute</b> them back to the community for all of us to share this functionality and improve on it.

//kracker
<i>linkin park : nobody's listening</i>
<i>sole : cheep entertainment</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/