Restricts Page using user groups

Vote:
 

Hi all,

Is there any way to restrict the pages based on  the user groups?

Thanks

#144039
Feb 04, 2016 16:40
Vote:
 

Definitely. Set security on any content in admin is easiest. Remove access for everyone and add any group you want...

Content inherit security settings from the parent node normally

#144042
Feb 04, 2016 16:45
Vote:
 

Check out the admin handbook at 

http://world.episerver.com/documentation/Items/user-guides/

and read the section about "Access rights in the content structure"

#144043
Feb 04, 2016 16:48
Vote:
 

Hi Daniel,

Thanks for your reply.

How to handle this by code or Api. Any idea.

Thanks. 

#144047
Feb 04, 2016 17:05
Vote:
 

You can filter any content or collection easiest by using EPiServer.Filters...

Check out 

http://world.episerver.com/documentation/class-library/?documentId=cms/7/80810477-7193-d5fc-a919-57fc44b93583

Usually the easiest way is to use FilterContentForVisitor

http://world.episerver.com/documentation/class-library/?documentId=cms/7/cec31d00-7e91-109f-dc1e-7c9aaa7e7786

#144049
Feb 04, 2016 17:12
Vote:
 

Hi Daniel,

I have given read access only to my user group, but when i render the page in browser it redirects to episerver editor login page.

But i need to redirect to my custom login page. Is that possible. And i have used this code in rendering page Template.

 bool val = CurrentPage.ACL.QueryDistinctAccess(EPiServer.Security.AccessLevel.Read);

if(val)

response.redirect(myloginpage);

#144053
Feb 04, 2016 17:46
Vote:
 

Epi will automatically redirect you to login page if you dont have access to current page so your code will never be used.

The login page Epi will use as target is the one set in web.config. Search for login.aspx and replace that with url to your custom page

#144061
Feb 04, 2016 23:11
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.