Enabled NetmailPolicy, users can see netmail if they are in the seen-by, a ZC or admin

This commit is contained in:
2023-12-19 11:45:11 +11:00
parent 90206f2bb5
commit c9d04b64ac
4 changed files with 44 additions and 5 deletions

View File

@@ -74,6 +74,17 @@ class User extends Authenticatable implements MustVerifyEmail
/* GENERAL METHODS */
public function addresses(): Collection
{
return Address::select('addresses.*')
->join('systems',['systems.id'=>'addresses.system_id'])
->join('system_user',['system_user.system_id'=>'systems.id'])
->where('system_user.user_id',$this->id)
->with(['zone.domain'])
->get();
}
/**
* See if the user is already a member of the chosen network
*