cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Add the "current user" to filter criteria in constraints

Add the "current user" to filter criteria in constraints

I would like to see the possibility to filter by some user properties in constraints. This could be used in comparisons of the current user and entries in specific user fields, or to check if a user belongs to a specific group/dynamic group.

 

Example 1: a constraint should prevent a status change if the current user is the same as the user which creates this item.

Example 2: the same constraint as in example 1, except the current user is member of the admin group.

 

At the moment we have to use triggers to fulfill similar requirements.

 

cheers, Jens

1 Comment
mrump
Alexandrite

I totally agree, 

Trigger based solutions are always our second best choice, for at least two reasons:

 

A) they can only "act" AFTER the user already completed his edit attempt (APPLY or SAVE), which is always a bit frustrating:

--> instead of "protecting" a user from a wrong input, the user can input anything and gets a error message in case of a problem

 

B) they are allways a kind of intransparent and harder to debug

--> a constraint can be seen directly in the type setup,

- there is no "secondary edit" case to think about