The problem with your solution is that it doesn't take into account aquired permissions. >for i in AUTHENTICATED_USER.getRoles(): > if i in SomeObject._View_Permission.getRoles(): > return 1 >return 0