Is it possible to set access rights directly on a page type somehow? I have a rather big tree of documents which are only shown to users with a given role. However some of those documents are of a certain type and I would like those to be available to Everyone without having to locate them in the tree and setting access rights on them manually.
I am using MVC and I have tried the AllowAnonymous and Authorize(Roles="Everyone") attributes on the controller of that page type, but the EPi access rights seem to override this setting.
Any ideas on how I can accomplish this?
Here you can read about how to do that, you use the access attribute on your contenttype
That seems to be what I am looking for but I cant get it to work?
I have put [Access(Roles="Everyone")] on the pagetype and confirmed in the admin UI that the page type now indeed says "Everyone: Create" in access level.
However, I still get redirected to the login page when I attempt to access those pages with a user in the role "Everyone". I tried to add Access=AccessLevel.Read to the attribute but it threw an exception saying only Create is supported (I hope this does not mean that anyone can now create that pagetype on my site...)
On the access rights tab in the admin UI the pages are configured with no read access for the Everyone role, but the documentations says that the Access attribute is applied AFTER this, so that should not be a problem..
Any more hints?
This attribute controls who shold be able to create/update the content, not viewing the content on the site. For that you set it in the admin interface, read more in the administrator manual:
Hope this help
Maybe I am being particularly dense today but that document seems to contains descriptions on how to set access rights in the tree structure only.
That is not what I am looking for. I want to set access right on a *page type* so that Everyone can read that page regardless of what the rights in the tree structure might be.
The reason I want to do this is that I have a page type that generates indexes of content, and I want the index available to Everyone. These indexes are scattered around in a gigantic tree and I dont want to track them down and set this manually.
Ok, I do not know if that is possible to do.
Mayby someone else has a better suggestion for you