Limit Kentico search results by user group - kentico

I'm working out a base requirements for a new kentico build. We want to limit content, either at the page or web part level by user group. What do I need to do to ensure search results only return what a user in a specific group is meant to see.
So three pages, page 2 is restricted to a group 1. Users from group 2 shouldn't see page 2 show up in a search result.

you can instruct the search web part to check the permissions of the results. Select Check permissions.
It will now check each user/role against your permission settings on each page.
see: https://docs.kentico.com/display/K9/Searching+according+to+page+permissions

Related

Why is the Sharepoint Site Owners group missing from Site Permissions?

I have a dev Sharepoint site with unique permissions (and fake users seen below). In the SharePoint manage access blade, the permissions appear as such:
However, when I click through to the Advanced Permissions link just below that, the permissions look as such:
MaksSite Owners is missing in the 2nd listing, though it appears in the first listing. This group appears to be the default Owners group that came with the SharePoint site. It is also missing when queried through the SharePoint REST API (via /sites/MaksSite/_api/web/GetFileByServerRelativeUrl('/sites/MaksSite/path/to/file')/ListItemAllFields/RoleAssignments?$expand=member). Which listing is right, and if it is the first listing, how do I get it to appear, at least with the API?
By default, the Site Owners group is hidden in the list. To make it appear, please take the following steps:
Click List Settings under Settings.
Scroll down to Views, click Detail View.
In Filter section, choose show all items in this view. Then save the view.
The Site Onwers group will appear in the list:
You could try to use the below Rest API:
/_api/web/GetFileByServerRelativeUrl('/sites/michael/Shared%20Documents/Document.docx')/ListItemAllFields/RoleAssignments/groups?$expand=users

Log user out when s/he visits certain page

I have different Kentico microsites (site 1, site 2) that are password protected. Each site has a separate pair of userid/pw to log in (site 1 > userid1/pw1; site 2 > userid2/pw2). The problem I have is there are a couple of users that have access to both sites, so if they log into site 1, they can't right away log into site 2 without having to clear cache first.
I understand it's not a good practice to do the above, but to temporarily fix the issue at hand, is it possible to automatically end users' current session (log them out so to speak) when they visit certain page. That way those users can log in site 1 and 2 more easily.
I only have access to admin but don't have access to backend, file system stuff. Thanks!
My suggestion would be to create a custom web part which does checking to see if the current user has access to given microsite. If not, log them out. This web part would be placed on the master page template of each microsite.
Another option is to assign roles to the user(s). This would allow one user account for 1 person across multiple microsites.

Kentico 9 - How to get assigned role info or name to a document

In Kentico 9 application, assigned different role to specific documents, so that only authorized user can have access of that specific document or page.
There is drop down list showing page list, and need to show only those page which have same access role as logged in user have.
Is there in kentico in built macro available to achieve same or what kentico API could be used to get document assigned role in transformation or grammatically?
If you're using some viewer web part, like repeater, there is a checkbox in web part settings saying check permissions - this will return only documents current user can see.
If you're pulling documents in code behind use document query CheckPermissions method like this:
DocumentHelper.GetDocuments()
.Published()
.Where(where)
.CheckPermissions();

Access Denied when using ExecuteQuery() for a Sharepoint site

clientContext.ExecuteQuery();
All I'm trying to do is to get (not edit) the list of users I'm a specific group from a Sharepoint site for an MVC app. I'm getting an Access Denied error when I run this line as an Admin. But this line runs just fine if I'm added to the Owners group.
I can also view the group lists through the Sharepoint site if I'm under one or the other or both groups via a web browser. It looks like both groups have the exact same permissions, too. What gives?
I'm unable to change anything else from the Sharepoint side as well, so this is not an option.
If it helps, I'm also using this as a tutorial: http://msdn.microsoft.com/en-us/library/ee538244(v=office.14).aspx
If you go to the group through the UI as a user you need to edit the setting that allows other group members to see whos in the group
Navigate to site settings > people and group > click on your Group > on one of the menus like actions theres an option for group settings. In this settings area there are two config sections, One is to do with who can add users to the group and who can see who is in the group. Check these settings are correct.
Cheers
Truez

pages not changing when changing user group in liferay 6

I am using Liferay and I have created 3 user groups. My application is like ,the user will be able to switch user groups in the UI using a drop down. When I login for a specific user group the pages are visible according to user group.
But when I switch user groups, the pages do not change according to user groups. Logs show that the change in user group is detected. The same was working in liferay 5. Please suggest what has to be done.
Thanks in advance

Resources