Not showing AddressDB menu if user does not own gwr Network

This commit is contained in:
Frank Schubert
2023-05-25 14:09:13 +02:00
parent f680170da2
commit f26fbbf397
3 changed files with 13 additions and 4 deletions

View File

@@ -260,6 +260,14 @@ class User extends mfBaseModel {
return $typenets;
}
public function hasGwrNetworks() {
$my_networks = $this->myNetworks(["netowner"]);
foreach($my_networks as $network) {
if($network->adb_netzgebiet_id) return true;
}
return false;
}
private function getMyNetworks() {
if(!$this->id) {
return false;