Is there any way to hide the pages from the site according to the user group?

I have tried the below code.

isusermemberofgroup( username:loggedInUser(), groupId:cons!UMS_ASSIGNEE_GROUP )

But it is not working. Is there any other way to hide the pages from the site according to the user group?

  Discussion posts and replies are publicly visible

Parents
  • Yes. While configuring your site page your define the visibility condition.

    For your case it should work. Check whether the constant type is mapped with group, mapped group has the user.

    Try without using without parameter names like isusermemberofgroup(loggedInUser(),cons!UMS_ASSIGNEE_GROUP).

    If not create a separate rule and check whether the rule is giving appropriate output. So that you can have what the expression is returning.

    Also check the security of the rules folder.

  • I tried isusermemberofgroup( username:loggedInUser(), groupId:cons!UMS_ASSIGNEE_GROUP ) in expression rule, it is returning false value. But still the page is visible.

  • 0
    A Score Level 1
    in reply to anjalivarier

    If you are testing by using system administrator login it will not effect the security settings.

    While testing use basic user. Not the System administrator

  • I created a new user for testing. But access is denied to my application. How to give access to user that I have created?

  • Please add the created user in the group(which has access to your application) and also provide security for application and other appian objects.

  • +1
    A Score Level 1
    in reply to anjalivarier

    As the best practice, we assign the security to the groups.

    Find out the group(in your case cons!UMS_ASSIGNEE_GROUP) which has access to the application, add the newly created user to that group.

    Configure the security for the Site page object (Action/Record/Report) with the same group (minimum access should be Viewers)

    Set the security to the Site with the same group (minimum access should be Viewers)

    Note: When you configure the groups or security settings login as System Administrator account. While testing login as newly created user. So that you can have the clear visibility.

  • 0
    Certified Senior Developer
    in reply to Dude

    Hi,

    I have a similar requirement and wanted to share my approach.

    I have a Site with 3 pages: XYZ Home, XYZ Search, and XYZ Admin.

    My requirement:

    - Hide the XYZ Admin page from the Site navigation bar

    - In XYZ Home, provide a link that opens the Admin page in a new tab

    For hiding the Admin page from the navigation, I used the visibility expression on the Site page:

    I am giving as false in the visibility section of the page (still I can able to view it)

    For opening it in a new tab from XYZ Home, I used a!safeLink() with the Admin page URI:

    a!safeLink(

      label: "XYZ Admin Page",

      uri: "https://<instance>/suite/sites/<site-stub>/page/<admin-page-stub>",

      openLinkIn: "NEW_TAB"

    )

    My questions:

    1. Is a!safeLink() the right approach for opening a Site page in a new tab?

    2. Does the visibility expression also block direct URL access, or only hides from navigation?

    3. Should I also add a showWhen on the a!safeLink() so non-admin users don't see the link in XYZ Home?

    Any inputs would be helpful. Thank you!

Reply
  • 0
    Certified Senior Developer
    in reply to Dude

    Hi,

    I have a similar requirement and wanted to share my approach.

    I have a Site with 3 pages: XYZ Home, XYZ Search, and XYZ Admin.

    My requirement:

    - Hide the XYZ Admin page from the Site navigation bar

    - In XYZ Home, provide a link that opens the Admin page in a new tab

    For hiding the Admin page from the navigation, I used the visibility expression on the Site page:

    I am giving as false in the visibility section of the page (still I can able to view it)

    For opening it in a new tab from XYZ Home, I used a!safeLink() with the Admin page URI:

    a!safeLink(

      label: "XYZ Admin Page",

      uri: "https://<instance>/suite/sites/<site-stub>/page/<admin-page-stub>",

      openLinkIn: "NEW_TAB"

    )

    My questions:

    1. Is a!safeLink() the right approach for opening a Site page in a new tab?

    2. Does the visibility expression also block direct URL access, or only hides from navigation?

    3. Should I also add a showWhen on the a!safeLink() so non-admin users don't see the link in XYZ Home?

    Any inputs would be helpful. Thank you!

Children
No Data