Restrict portal page access in function of member of a group

CKJBeOS1
Tera Contributor

Hi,

I have made a change in SPEntryPage and it's work, but only for loggin when user try to go into bas url of instance or portal.

// no login to user from group "Group Name" without role
if(!user.hasRoles() && user.isMemberOf("Group Name"))
	return "/logout.do";

But if user go to direct url, he can access to the page, i would like to apply the same filtering of group member for all portal pages, but i can't find solution or information.

ex : https://cd68dev.service-now.com/portail?id=sc_cat_item&sys_id="the sys_id of page"

(We using for loggin an Azure SSO)

Regards,

Cedric

1 ACCEPTED SOLUTION

Hi Martin,

 

In fact i can't find a way to restrict without using a "role", and not pages per pages.

I do it in otherway, i add a script into user notification tha put or not the link into incident or request.

with that, i acan control that some user never get an url to a page of portal.

 

Regards,

Cédric

View solution in original post

4 REPLIES 4

Martin Ivanov
Giga Sage
Giga Sage

Hi. You can achieve this by navigating to the page you want to limit access to and define which roles will have access. You can give the role to a group/user that you want to have access and it will be restricted for the users that do not have the role.

Mark Correct and Helpful if appropriate.

find_real_file.png


Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024

Hi Martin,

 

but standard user (portal only) don't have any roles.

it exist or not a role that not used a servicenow licence ?

 

Regards,

Cedric

Martin Ivanov
Giga Sage
Giga Sage

Hi. If some answers have helped you, mark them Helpful and/or Correct in order to close the case. Thanks!


Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024

Hi Martin,

 

In fact i can't find a way to restrict without using a "role", and not pages per pages.

I do it in otherway, i add a script into user notification tha put or not the link into incident or request.

with that, i acan control that some user never get an url to a page of portal.

 

Regards,

Cédric