Forums / Developer / HOWTO: Restrict access to new ?TPL-file? in module

HOWTO: Restrict access to new ?TPL-file? in module

Author Message

Dominik Pich

Wednesday 14 January 2004 4:46:21 am

I added a preregister.tpl to the user module which I need to call before calling register ( PRE :P)

Anyways, the anonymous user has no access to this :(
How to change this so that all have access!?

Eirik Alfstad Johansen

Wednesday 14 January 2004 6:44:16 am

Hi Dominik,

Have you created a separate view for this template (user/preregister)? If so, I belive that it's this view that the user should have access to and not the templates. I might be wrong, though.

Sincerely,

Eirik Johansen

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Dominik Pich

Thursday 15 January 2004 3:52:11 am

First, thank you for helping AGAIN :)

I need to add new views to the USER module
user/preregister
user/register2

I created the tpl file in myview/templates/user annd tried also creating it in standard/templates/user

I further edited settings/site.ini and added
PolicyOmitList[]=user/preregister

But all I get is 'view not found'
Editing the kernel I could but it isnt cool -> upgrade

Eirik Alfstad Johansen

Thursday 15 January 2004 4:51:12 am

Hi Dominik,

> Editing the kernel I could but it isnt cool -> upgrade

That's true, but AFAIK, the only way to add a view to a module is to do just that. Simply adding a template by the same name won't do.

Have you considered putting your new views into a new module (an extension) to keep you away from tampering with the kernel code?

Sincerely,

Eirik Johansen

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/