Share » Forums » Setup & design » HowTo protect folders

HowTo protect folders

HowTo protect folders

Wednesday 13 August 2003 6:42:58 pm - 4 replies

Author Message

Bjørn Kaarstein

Thursday 14 August 2003 12:50:38 am

I suppose you can assign this folder of yours to its own section, and create a user/group that have the rights to view this section.
If you don't give these rights to the anonymous user, your section won't be available until you're logged in.

Regards Bjørn

Sander Jansen

Thursday 14 August 2003 1:08:38 am

I guess there are many ways to accomplish this, but here's what I would do: duplicate the folder class and name it for example hidden_folder... and then edit your roles and give proper permissions to the ones that _should_ be able to view the folder.

An other way to do it is to add an override to an error page ;-)

Tristan Koen

Thursday 14 August 2003 2:15:07 am

Another approach you could consider is to put the logic to control this into your template. This keeps the admin side of things simple.
The drawback is (of course) that the roles applicable to your exclusion are hard-coded into the template (the role can be assigned as usual through the admin pages though).

Try something like this:

{section show=fetch(user,current_user).roles.id|contains,array(id's to exclude)}
...
{section-else}
...
{/section}

John van der Boom

Thursday 14 August 2003 7:01:29 am

Thank your for your reply. I appreciate it.
I think I'm gonna try the solution of Sander with that error page thing. It sounds nice. :)

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu