Can someone help me with user types and privacy roles?

Hello, I am trying to make logs visible only for specific user type. So there are 2 types of users : “internal users” and “subs/vendors”. When I add a log and I specify which user type can view it lets say “internal users”, only internal users can view this log in the repeating group. So this is what I have done so far.

If you need more details, I will happily provide more information. Any help is appreciated!
Thanks in advance!

Hey Mark,

I think you made it over complicated to be honest. In your User data type, you have two fields:

  • Type, which is of type Teams (what is this option for?)
  • User Type, which is of type User Type (either internal or subs)

I currently don’t see how these are related to each other? Are the options in Teams the same as User Types?

A way to make it more simple would be to only have one field User Type of type text in User, and set the value of this field to either internal users or subs/vendors

Then you could have a similar text field in Post depending on which user type you want to show it to. Your constraint visible = Current User’s Type would then work

Hey ambrose, thanks for replying!

Teams is an option set. I made “team” so I can add a dropdown and I can choose from that option set. I made “User types” so I can change the User type for users and if the user type is = to the dropdown value then it is visible to the current user. I thought that way is the best to go so I can choose what post is visible to what type of users. I understood your way but there is some limitations. So lets say I added a post and I need it to be visible to internal users and subs, I don’t think there is a way to do that because then I have to remove the constraint from the RG data source “search for”. I can replace the dropdown with a permission table just like in the image below and if the checkbox is checked, this post is visible to the checkbox value.

permissions2
permissions3

I tried to add checkboxes but didn’t know what to do after that. I tried to add a field in “Post” data type but didn’t work. I am sure that I made a mistake somewhere. Checkboxes are essential if posts need to be visible for more than one user type.

Any ideas?

Hey @grace.hallak

I understand better now thanks, it’s just that both seemed to have the same function so it was a bit confusing. In my opinion you should go with the checkboxes option. This way you would only need User Types, it’s much easier than having to deal with Teams + User Types.

  1. In your Post data type, create a field Permissions (list of User Types)

  2. Create workflows in your Create Post page:

  • when checkbox’s value is changed and checkbox is checked: make changes to Post -> Permissions add This Checkbox’s value
  • when checkbox’s value is changed and checkbox is unchecked: make changes to Post -> Permissions remove This Checkbox’s value
  1. Create a condition on your post so that when Permissions contains Current User’s User Type, Post is visible

Let me know if that works for you

1 Like

thanks! I will try it now.

this is showing up. What should I do about this? am i doing something wrong?

do you need the editor link? I think it will be easier for you

@grace.hallak

In the Make changes to Thing window, instead of setting the Thing to Change to Search for Posts’s Permissions, just set it to Search for Posts’s first item (you could even set it to Current Page Post I guess?)
Then select the field Permission

okay it is showing now to change a field

there is no this checbox’s value

Okay, just don’t forget to have two workflows: one when checkbox’s value is changed and checkbox is checked, and the other one when checkbox’s value is changed and checkbox is unchecked

yeah sure thanks for the help

Sure feel free to send it and I’ll have a look

okay right away

Okay @grace.hallak so I have changed the Permissions field to a list of text and have done a couple of workflows to add or remove Internal in that field when the checkbox Internal User is checked or unchecked

The fact that your User Types fields are yes/no complicates it a bit, but it will work when you set a condition When This Post’s Permissions contains Internal and Current User’s User Type’s Internal Users is yes -> this post is visible

thanks I will see if it will work now

sorry for the many questions but where do I set the condition? on the repeating group that displays the posts? (just making sure that I am doing this right)

It is not working. Should I save the checkbox value with the post using the “Save” button?