Error data not accessible when i use CurrentUser Slice in security filter

GFormMLH_0-1661162156554.png

Hi everyone. I'm trying to create a security filter that will filter rows depending on the user (custom) roles (Chef, Super Admin, Admin or Basique). 

Super Admin should be able to see every row, Admin only Chef and Basique rows, and Chef can see only Basique rows. 

This is the formula i'm using : 

IF(INDEX(Current_User[Position], 1) = "Super Admin",
true,

IF(INDEX(Current_User[Position], 1) = "Admin",
and([Position] = "Chef", [Position] = "Basique"),

IF(INDEX(Current_User[Position], 1) = "Chef",
[Position] = "Basique",true)
))

GFormMLH_1-1661162252703.png

This is the slice i'm using to ref the current user : 

GFormMLH_2-1661162407163.png

Any help is welcomed !

Solved Solved
0 5 149
2 ACCEPTED SOLUTIONS


@dbaum wrote:

In your case, likely the Current User slice is based on the Users table, in which case the Users table's security filter won't be able to reference the table's own slice.


For filtering your User table, use a Slice instead.

  • Though of course there's about half a dozen options that come to mind for ways to make this work... many of which are detailed here in the community.

View solution in original post

Change your table's security filter to directly reference the USEREMAIL function rather than referencing the Current User slice. Implement a technique based on a cloned subset of your Users table that governs which users have access to rows from the Users table beyond their own row. You can still use the Current User slice elsewhere in your app.

View solution in original post

5 REPLIES 5
Top Labels in this Space