Visibility roles of a site page

Hello,

I have a question with the visibility roles of a site page. I have three sites (request, management, new) and in each. For example

"
=isusermemberofgroup(tostring(loggedInUser()), a!groupsByName("managers"))"

but I can not see or see a page if I get a different role

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    I can't tell what you're asking.  What are you expecting or hoping to happen?  What are you experiencing instead?

  • Title                       Icon                                                 Content Visibility
    Consultation     C_PM_consultationSol                  =isusermemberofgroup(tostring(loggedInUser()), a!groupsByName("managers"))
    Management    C_PM_managementSol                =isusermemberofgroup(tostring(loggedInUser()), a!groupsByName("analyst"))
    Registration      C_PM_registrationSol                   =isusermemberofgroup(tostring(loggedInUser()), a!groupsByName("managers"))

    I need these roles for these sites and I do not know how to do it:
    manager: registration and consultation
    analyst: management and consultation

  • Hi Alejandro - you need to think in terms of "sets". You will have one "set" (or Group) that represents Managers, another for Analysts; and then you need 3 other "sets" (Groups) that represent the roles of: Consultation, Management and Registration.

    Your Consultation Group needs to contain: the Manager and Analyst groups

    Your Management Group needs to contain: the Analysts group

    Your Registration Group needs to contain: the Manager Group

    Your visibility rules will then refer to the relevant group from the second set.

    Note: it's better to use constants to hold references to groups than use the a!groupsByName() because a Group's name is not immutable - someone might edit that Group and change its name. But a constant of type 'Group' will act as a permanent pointer to the Group even if the Group's name is changed. Where you need a list of the Groups, re-use the ones you've created as single constants and write an Expression Rule to return the list of those Groups

    Your code should look something like this:

    Title Icon Content Visibility
    Consultation C_PM_consultationSol =isusermemberofgroup(tostring(loggedInUser()), rule!XXX_ER_GROUPS_CONSULTATION)
    Management C_PM_managementSol =isusermemberofgroup(tostring(loggedInUser()), cons!XXX_GROUP_ANALYST)
    Registration C_PM_registrationSol =isusermemberofgroup(tostring(loggedInUser()), cons!XXX_GROUP_MANAGER)

    Hope this helps


    S>

Reply Children