Permalink
Browse files

Adjust HSS model

  • Loading branch information...
ibot3 committed Oct 15, 2018
1 parent 15bc2b4 commit 518ae8d6e61d28a38dd589cd674fbdfbf919bda9
Showing with 14 additions and 0 deletions.
  1. +14 −0 sipa/model/hss/user.py
@@ -221,13 +221,27 @@ def realname(self):
def login(self):
return self._pg_account.account.strip()

@unsupported_prop
def network_access_active(self):
raise NotImplementedError

@network_access_active.setter
def network_access_active(self, value):
raise NotImplementedError

def activate_network_access(self, password, mac, birthdate, host_name):
raise NotImplementedError

@active_prop
def mac(self):
return {'value': ", ".join(mac.mac.lower() for mac in self._pg_account.macs),
'tmp_readonly': len(self._pg_account.macs) > 1}

@mac.setter
def mac(self, new_mac):
pass

def change_mac_address(self, new_mac, host_name):
# if this has been reached despite `tmp_readonly`, this is a bug.
assert len(self._pg_account.macs) == 1 or not self.has_connection

0 comments on commit 518ae8d

Please sign in to comment.