Protecting User Register - Administration Interface.

Author Message

John Smith

Friday 27 November 2009 12:54:16 am

Hi guys,

Hope someone can help me. What is the best way to protect the following URL from public.

http://www.xxxx.com/xx_admin/user/register

I dont want to disable registration module for administration interface.

Cheers,

Damien Pobel

Friday 27 November 2009 1:11:39 pm

Hi John,

you could try to add the following lines to the site.ini.append.php file of siteaccesses where you want to disable user/register view :

[SiteAccessRules]
Rules[]
Rules[]=access;enable
Rules[]=moduleall
Rules[]=access;disable
Rules[]=module;user/register

Cheers

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

John Smith

Saturday 28 November 2009 2:12:32 am

Cheers, mate, I do not want to disable the registration view, looking to protect it from certain IP addresses.

Anybody else please?

Damien Pobel

Saturday 28 November 2009 3:15:26 am

I don't think you cannot do that directly in eZ Publish without modifiying kernel/user/register.php or by writing your own view in an extension to register users.

If you use Apache, you can also set up some rewrite rules that filters the access to /user/register based on the IP.

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

Sylvain Gogel

Monday 30 November 2009 2:15:12 pm

I agree with Damien, it's not something you can easily acheave at application level, but Apache rewrite rules can do.

At ezpublish you can create your own register module that will call the user/register view and add a security check before running if.

--
http://www.ecedi.fr
Agence Web, Créa/Conseils, Accessibilité
eZPublish, Drupal, Zend, Symfony

John Smith

Tuesday 08 December 2009 4:21:13 am

So this means, there is no way we can protect the following URL from Anonymous Users in out of the box solution.

http://www.xxx.com/xx_admin/user/register

Anyone can register if you know the URL...

EzCrew any possible quick solution?

Gaetano Giunta

Tuesday 08 December 2009 7:29:43 am

it's about roles and policies - to block anon user registration you will have to alter some settings in an override of sinte.ini.

Search for this text in the default site.ini for more details:

 # A list of module or module/views that don't require user login
AnonymousAccessList[]

Principal Consultant International Business
Member of the Community Project Board

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 18 2025 10:31:41
Script start
Timing: Jan 18 2025 10:31:41
Module start 'layout'
Timing: Jan 18 2025 10:31:41
Module start 'content'
Timing: Jan 18 2025 10:31:42
Module end 'content'
Timing: Jan 18 2025 10:31:42
Script end

Main resources:

Total runtime1.1562 sec
Peak memory usage4,096.0000 KB
Database Queries73

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 589.1797152.6406
Module start 'layout' 0.00670.0038 741.820339.4922
Module start 'content' 0.01061.1440 781.3125662.8125
Module end 'content' 1.15460.0016 1,444.125016.1250
Script end 1.1561  1,460.2500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2969160.0002
Check MTime0.00130.1162160.0001
Mysql Total
Database connection0.00100.090310.0010
Mysqli_queries1.086893.9958730.0149
Looping result0.00100.0843710.0000
Template Total1.122497.120.5612
Template load0.00220.192420.0011
Template processing1.120296.887720.5601
Template load and register function0.00020.020310.0002
states
state_id_array0.00100.085510.0010
state_identifier_array0.00110.094020.0005
Override
Cache load0.00190.1616350.0001
Sytem overhead
Fetch class attribute can translate value0.00100.090840.0003
Fetch class attribute name0.00150.1314100.0002
XML
Image XML parsing0.00180.154640.0004
class_abstraction
Instantiating content class attribute0.00000.0020110.0000
General
dbfile0.00230.1983280.0001
String conversion0.00000.000840.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
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/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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 23
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs