Forums / Setup & design / force login for a section

force login for a section

Author Message

Lydie Soler

Friday 29 July 2005 9:28:59 am

I have created a section intranet. I want to force anonymous user to log in but only for this section.

How can I do this?

Thanks for your help

Arran Price

Monday 01 August 2005 2:21:52 pm

Hi Lydie,
Create a new section from the admin interface and assign it to the node you want. Then go and check the role for the anonymous users and make sure they dont have access to it. By default if a user (including anonymous users) dont have access to anything they will be prompted with a login screen.

Arran

Lydie Soler

Tuesday 02 August 2005 2:00:30 am

Thanks for your answer. But if I do that, the node associated with the section doesn't appear anymore in my menu....
Why?.... I suppose it is because the anonymous doesn't have access to it...
How can I make it appear?
THanks for your help

David Eriksson

Tuesday 02 August 2005 2:06:08 am

Edit the permissions of Anonymous, adding the right to read objects of your new section.

/David

Lydie Soler

Tuesday 02 August 2005 2:14:00 am

I add the folowwing policy:
content read Section( Intranet )

I can see it in the menu, but it doesn't ask for login (which seems quite correct for me as I just add the right to read the content....)
So I suppose I didn't add the right policy. Can you be more precise on the policy I need to add?
Thanks

David Eriksson

Tuesday 02 August 2005 2:58:44 am

Hmm, sorry, I didn't read your original post well enough it seems. :)

I'm not sure how to solve this really. I guess one solution might be to add links to the menu, thus getting an object that shows up in the menu and when clicked on leads to the hidden object, prompting a login. You'd have to add a new link for every new hidden object you'd like to appear in the menu though...

/David

Arran Price

Tuesday 02 August 2005 4:21:41 pm

the issue is, theres no way to force a login, if the user can already see the conent (theres simply no point).

So as David mentions, you need to do something like add a link to that content so that it appears in your menu.

If you put all your restricted content in a new folder, then its only that folder you need to add a link to, call it members area or something like that perhaps.

The next hitch I guess is that once you are logged in, the menu will show both the link and the restricted folder. You will need to edit the menu template (if you are using one of the default ones) to get that to work I think OR copy the folder class, and use that for your new folder the reason for doing this is that unless you put it in the appropriate settings file, the new class wont show up in the menu (I opt for the new class).

hope thats of some help

Arran

eZ debug

Timing: Jan 21 2025 02:47:25
Script start
Timing: Jan 21 2025 02:47:25
Module start 'content'
Timing: Jan 21 2025 02:47:26
Module end 'content'
Timing: Jan 21 2025 02:47:26
Script end

Main resources:

Total runtime1.0529 sec
Peak memory usage4,096.0000 KB
Database Queries208

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0095 587.7188180.8359
Module start 'content' 0.00950.9017 768.5547600.3984
Module end 'content' 0.91130.1416 1,368.9531337.7891
Script end 1.0528  1,706.7422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.4052210.0002
Check MTime0.00160.1501210.0001
Mysql Total
Database connection0.00160.150910.0016
Mysqli_queries0.967391.86582080.0047
Looping result0.00210.19832060.0000
Template Total1.009895.920.5049
Template load0.00250.237420.0012
Template processing1.007395.666420.5036
Template load and register function0.00020.016310.0002
states
state_id_array0.00150.147110.0015
state_identifier_array0.00110.101120.0005
Override
Cache load0.00200.1890330.0001
Sytem overhead
Fetch class attribute can translate value0.00150.139040.0004
Fetch class attribute name0.00140.131970.0002
XML
Image XML parsing0.00080.077040.0002
class_abstraction
Instantiating content class attribute0.00000.001470.0000
General
dbfile0.00220.2123210.0001
String conversion0.00000.000830.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
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/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: 21
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs