Automatically protecting all pages on a site (prevent "All Users")

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
5/13/2009 9:00:55 PM
Gravatar
Total Posts 31
There are 10 kinds of people in the world, those who know binary, and those who don't

Automatically protecting all pages on a site (prevent "All Users")

I am working on an intranet-based site where all pages on the site should be protected by login.

Only "authenticated users" should be able to see the pages by default.

Normally, when I click the icon to add a new page, the default setting under the "Security" tab is that the page grants permission to "All Users" to see the page. This checkbox should be un-checked and instead, the "Authenticated Users" should be checked. I now do this manually for every created page. It is not so convenient and it may be easy to miss out a page.

Is there some way to set this security property hierarchically or site-wide, so that all pages require the user to be authenticated, regardless of how it is created? Or, is there some way to make the page inherit all the settings on the "Security" tab from its parent, recursively? This would be much easier to manage, in case some branch or sub-branch needs specific protection and there are many pages below.

Advice appreciated!

5/14/2009 5:01:34 AM
Gravatar
Total Posts 18439

Re: Automatically protecting all pages on a site (prevent "All Users")

Hi,

I will add a config option for the next release coming soon.  The new setting will be named NewPagesVisibleToAllUsersByDefault and it will default to true but you can set it to false and this will keep it from automatically checking the "All Users" role when creating new pages.

In the meantime an alternative solution is to find this in Web.config:

<authentication mode="Forms">
<forms name=".mojochangeme" protection="All" timeout="50000000" path="/" cookieless="UseCookies" />
</authentication>

and change it to this:

<authentication mode="Forms">
<forms loginUrl="Secure/Login.aspx" name=".mojochangeme" protection="All" timeout="50000000" path="/" cookieless="UseCookies" />
</authentication>
<authorization>
<deny users="?" />
</authorization>

That will force login in order to view any page, though it may not work correctly if using folder based multi site installation.

Hope it helps,

Joe

5/17/2009 10:02:07 PM
Gravatar
Total Posts 31
There are 10 kinds of people in the world, those who know binary, and those who don't

Re: Automatically protecting all pages on a site (prevent "All Users")

Hi Joe,

Thanks for that, but what I am really looking for is a checkbox saying "Inherit from parent". The "template"-style approach will not help management of existing pages effectively.

For example: Roles that can view this page > Inherit from parent page - check! (all other options are grayed out but shows the parent's setting)
Same thing for Roles that can edit this page, Roles that can create pages: all should allow "Inherit from parent".

I am a bit worried about the huge clicking effort for making security changes to a large site installation without such inheritance! Without this, it will create some kind of dis-incentive to use fewer pages if there is a slight hint of future security changes needed.

The suggestion of how to set checkboxes should only be used for new pages _without parent_. If the user is creating a child page, the parent's settings should be inherited by default. It makes sense for file systems and most hierarchies (if you can't get through the entrance, don't bother the rooms). This may also be useful for other settings (caching, show breadcrumbs, etc) but my top concern is really security.

So, on page access, if a page inherits its parents settings, the system would check backward until it finds a page that does not inherit (ultimately, this will at least be true for the root, if no other page).

 

 

5/19/2009 5:47:42 AM
Gravatar
Total Posts 18439

Re: Automatically protecting all pages on a site (prevent "All Users")

It has always inherited edit roles from parent, previously view roles for new pages were determined by the  <add key="DefaultPageRoles" value="All Users" /> setting in Web.config/user.config

In the new release 2.3.0.4 I have changed it so that new pages if they are root level pages still inherit view permissions from the config setting but if they are child pages inherit them from the parent.

I did not add the setting NewPagesVisibleToAllUsersByDefault, that I mentioned above, as it wa snot needed sincwe we already had the DefaultPageRoles setting.

Hope it helps,

Joe

10/22/2011 1:21:39 PM
Gravatar
Total Posts 87

Re: Automatically protecting all pages on a site (prevent "All Users")

Hi,

I need to protect my site from anauthenticated users temporarely (while the site is in development stage) so i need to restric acccess to all pages, but not by setting default pages access  and i tryed authorisation tag mentioned above but it works not too good - namely it also blosck access to css handlers to unathenticated users. So users see login page but it looks ugly - any other ideas?

So far i put dummy index.html page to hide the site from accidential visitors. But it would be good to have some better method.

Thank you.

Regards,

Victor

10/23/2011 7:18:21 AM
Gravatar
Total Posts 18439

Re: Automatically protecting all pages on a site (prevent "All Users")

The current release does not have a way to do this, but the next release will have a way to close the site so that only admins and content admins can access it. This is already implemented in the source code repository so ti will definitely be in the next release.

Best,

Joe

10/23/2011 3:00:51 PM
Gravatar
Total Posts 87

Re: Automatically protecting all pages on a site (prevent "All Users")

Loking forward, thank you.

Regards,

Victor

You must sign in to post in the forums. This thread is closed to new posts.