8 use BristolSU\ControlDB\Contracts\Repositories\Group as GroupRepository;
9 use BristolSU\ControlDB\Contracts\Repositories\Role as RoleRepository;
65 if ($this->
groups == null) {
78 if ($this->
roles == null) {
79 $this->
roles = $this->
user()->roles()->map(
function(Role $role) {
80 $role->group = $role->group();
81 $role->position = $role->position();
123 $this->
groups = $this->
groups()->filter(
function(Group $group) use ($logic) {
127 $this->
roles = $this->
roles()->filter(
function(Role $role) use ($logic) {
167 'user' => $this->
user(),
169 'groups' => $this->
groups(),
170 'roles' => $this->
roles()
183 return json_encode($this->
toArray(), $options);
filterForLogic(Logic $logic)
evaluate(Logic $logic, $userModel=null, $groupModel=null, $roleModel=null)