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/

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 00:55:32
Script start
Timing: Jan 19 2025 00:55:32
Module start 'layout'
Timing: Jan 19 2025 00:55:32
Module start 'content'
Timing: Jan 19 2025 00:55:33
Module end 'content'
Timing: Jan 19 2025 00:55:33
Script end

Main resources:

Total runtime1.1724 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 589.2891152.6406
Module start 'layout' 0.00560.0031 741.929739.4766
Module start 'content' 0.00871.1625 781.4063634.3906
Module end 'content' 1.17110.0013 1,415.796916.1250
Script end 1.1724  1,431.9219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.3062160.0002
Check MTime0.00130.1129160.0001
Mysql Total
Database connection0.00080.068510.0008
Mysqli_queries1.087592.7533680.0160
Looping result0.00070.0563660.0000
Template Total1.124295.920.5621
Template load0.00250.215020.0013
Template processing1.121795.672620.5609
Template load and register function0.00020.018610.0002
states
state_id_array0.00450.380810.0045
state_identifier_array0.00130.109220.0006
Override
Cache load0.00210.1801560.0000
Sytem overhead
Fetch class attribute can translate value0.00060.052730.0002
Fetch class attribute name0.00140.115890.0002
XML
Image XML parsing0.00410.353930.0014
class_abstraction
Instantiating content class attribute0.00000.0023120.0000
General
dbfile0.00530.4556310.0002
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 34
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs