We have a “Access Types” collection and a “Authority” group. The can-read of both of them is can-read: user .‘Admin’?‘Yes’. But when you login as Admin “No”, you can’t see the “Authority”-menu and you still can see the “Access Types’. We also want to not show the “Access Types’-menu. We think it is because the Access Types is a collection and the Authority is a group.
Code:
'Access Types': collection \['Type'\] @small {
can-read: user .'Admin'?'Yes’
'Authority': group {
can-read: user .'Admin'?'Yes'
Hi there, you were drawing the right conclusion. It is because it is a collection. The problem with that is that user rights can be different per entry and so when the gui is generated, we do not know whether the view on the collection is needed or not. I would agree that in this case, it is fairly simple to see that no entry is visible for a non-admin, but we do not draw conclusions about the visibility of the whole collection by evaluating can-read expressions per entry, those can get very complex.
You can place a group around the access types collection and set the user rights on that, or move it in the Authority group. You will have to update references to it, though (you will get errors showing you that you need to do that)
1 Like