Not showing AddressDB menu if user does not own gwr Network
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user