Re: [rules-users] Verify if an objects attribute exists

2010-09-14 Thread Mark Proctor
Pattern( field != null, eval( someFunc( field ) ) ) Mark On 14/09/2010 05:18, lnguyen wrote: > Sorry here is some additional details...I hope I'm not making this sound more > complicated than it really is but I am attempting to restrict access to view > an account based on the logged in user. >

Re: [rules-users] Verify if an objects attribute exists

2010-09-13 Thread lnguyen
Sorry here is some additional details...I hope I'm not making this sound more complicated than it really is but I am attempting to restrict access to view an account based on the logged in user. public class User { private Long id; ... private UserProfile userPr

Re: [rules-users] Verify if an objects attribute exists

2010-09-13 Thread Leonardo Gomes
You could try to explain a bit more how the User class and the isUserMatching method look like. Leo. On Fri, Sep 10, 2010 at 11:30 PM, lnguyen wrote: > > I'm having difficulty writing this rule. > > Background information: > A User can have a supervisor but it's not required. > > When viewing

[rules-users] Verify if an objects attribute exists

2010-09-10 Thread lnguyen
I'm having difficulty writing this rule. Background information: A User can have a supervisor but it's not required. When viewing User information I want to verify that the logged in user is either the current user or the currentUser's supervisor but I throw an exception when the supervisor obje