visibility of a page on the site

Can you help me on how I can restrict the visibility of my page if I put this in but the other role I have still sees it?

not ( isusermemberofallgroups(
user: loggedInUser(),
groups: a!groupsByName("RDCR Ejecutivo")

  )
)

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    Hi aliciam,

    Welcome to the community.

    1.) Why are you using isusermemberofallgroups()?  

    You try to check for one group here.

    ->try to use

    a!isUserMemberOfGroup()

    2.) Why not using a constant for the groups you try to check?

    3.) The statement tells :

    If a user is not member of all the groups you try to check(in your case one group) , then true-> because of the not() you change all true values into false and vice versa -> then false

    So translated: don't show if a user is member of the group but show it for everyone else.

    Regardless if they are member of other groups or no member in any group the visibility is just restricted for member of the groups.

Reply
  • 0
    Certified Senior Developer

    Hi aliciam,

    Welcome to the community.

    1.) Why are you using isusermemberofallgroups()?  

    You try to check for one group here.

    ->try to use

    a!isUserMemberOfGroup()

    2.) Why not using a constant for the groups you try to check?

    3.) The statement tells :

    If a user is not member of all the groups you try to check(in your case one group) , then true-> because of the not() you change all true values into false and vice versa -> then false

    So translated: don't show if a user is member of the group but show it for everyone else.

    Regardless if they are member of other groups or no member in any group the visibility is just restricted for member of the groups.

Children
No Data