Forums / Setup & design / Customizing Login Sequence for Intranet Site

Customizing Login Sequence for Intranet Site

Author Message

ola adigun

Tuesday 12 December 2006 7:47:00 am

I'm using ezp for an intranet site which requires login to access site, but I need a welcome page that's different from the login form shown by default. The welcome page will then have a link to /user/login. Of course you wouldn't need to login before seeing the initial welcome page. What's the easiest way to accomplish this?

Ola

kracker (the)

Tuesday 12 December 2006 8:08:05 am

I would create a siteaccess for your internet site ('intranet_user'), I then use the setting, '<i>IndexPage</i> (from 'site.ini.append.php') to control what is displayed on url/uri ('/').

IndexPage=/content/view/full/2

This should allow you to set a welcome / index page.

cheers,
//kracker

<b>References</b>
<i>http://ez.no/doc/ez_publish/technical_manual/3_6/reference/configuration_files/site_ini/sitesettings/indexpage
http://ez.no/doc/ez_publish/technical_manual/3_6/reference/configuration_files/site_ini/sitesettings</i>

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

ola adigun

Tuesday 12 December 2006 8:19:44 am

Thanks for the quick response. I have something like that currently in place. However, I still get the login screen. It is only after logging in that I get the welcome page set by IndexPage. How can I bypass login requirement for this one page.

Thanks!
Ola

kracker (the)

Tuesday 12 December 2006 8:42:08 am

This seems as though you are getting an eZ publish access permissions error.

If this is true, I've seen this when the default siteaccess is not configured correctly.

Often when upgrading or moving eZ publish from one instance to another (os/hardware).

Make sure your siteaccess settings are correctly setting the variable, 'RequireUserLogin'.

Short of that I would check your user / role and permissions for anonymous role.

cheers,
//kracker

<b>References</b>
<i>http://ez.no/doc/ez_publish/technical_manual/3_6/reference/configuration_files/site_ini/siteaccesssettings/requireuserlogin
http://ez.no/doc/ez_publish/technical_manual/3_6/reference/configuration_files/site_ini/siteaccesssettings</i>

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

ola adigun

Friday 15 December 2006 8:06:14 am

RequireUserLogin is currently set to true.

It seems that there's no way to selectively bypass this check for welcome page even if anonymous user has full access to the node that contains the welcome page. I even created a simple module, added it to policyomit and gave anon user full rights to it. Access to the module still redirected me to the login screen. This doesn't sound right. I don't want to have to create a completely different siteaccess just for one welcome page.

Recap of what I'm trying to accomplish:
User accesses home page of intranet (the welcome page above), preferrably stored in ezp.
User clicks Login button on this page to access intranet
User sees login form, then logs in

thanks.
Ola

Claudia Kosny

Friday 15 December 2006 8:23:03 am

Hi

I see two options right now (although there are certainly more)
- Set requireuserlogin to false and deny the anonymous user access to everything, then grant content read access to the node with your welcome page
- Leave requireuserlogin on true, create a custom module that has only the welcome page as view, set this view as default page and make use of AnonymousAccessList[] to allow anonymous access to this view.

Not sure whether any of these will suit your needs, but maybe it gives you an idea.

Claudia

ola adigun

Friday 15 December 2006 1:41:51 pm

Claudia:

Option two is preferred and working great. Is there a way to override pagelayout for the custom module?

thanks!
Ola

Claudia Kosny

Saturday 16 December 2006 1:49:55 am

Hi Ola

You can override it for a specific view like this:

<?php
//php code for the view

$Result = array();
$Result['content'] = ...
$Result['path']     = ...
$Result['pagelayout'] = 'custom_pagelayout.tpl'; 
?>

Claudia

eZ debug

Timing: Jan 18 2025 22:32:52
Script start
Timing: Jan 18 2025 22:32:52
Module start 'content'
Timing: Jan 18 2025 22:32:53
Module end 'content'
Timing: Jan 18 2025 22:32:53
Script end

Main resources:

Total runtime1.5427 sec
Peak memory usage4,096.0000 KB
Database Queries211

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 587.8438180.8125
Module start 'content' 0.00711.3021 768.6563644.4766
Module end 'content' 1.30920.2335 1,413.1328341.0547
Script end 1.5426  1,754.1875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00470.3050210.0002
Check MTime0.00180.1135210.0001
Mysql Total
Database connection0.00090.057310.0009
Mysqli_queries1.440293.35782110.0068
Looping result0.00280.18172090.0000
Template Total1.508797.820.7544
Template load0.00340.223620.0017
Template processing1.505297.573320.7526
Template load and register function0.00030.017210.0003
states
state_id_array0.00110.071610.0011
state_identifier_array0.00160.104020.0008
Override
Cache load0.00220.1408570.0000
Sytem overhead
Fetch class attribute can translate value0.00220.143940.0006
Fetch class attribute name0.00200.132990.0002
XML
Image XML parsing0.00130.087540.0003
class_abstraction
Instantiating content class attribute0.00000.0013100.0000
General
dbfile0.00680.4393290.0002
String conversion0.00000.000430.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
19content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
9content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 42
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs