Skip to content

Commit

Permalink
added mpsks clients
Browse files Browse the repository at this point in the history
added the first implentation for the client it self
still a lot to do
#498
  • Loading branch information
agmes4 committed Oct 3, 2024
1 parent cf11d98 commit 5845665
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions sipa/model/pycroft/user.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations
import logging
from datetime import date
from typing import List

from pydantic import ValidationError

Expand Down Expand Up @@ -319,6 +320,10 @@ def membership_end_date(self) -> ActiveProperty[date | None, date | None]:
capabilities=Capabilities.edit_if(self.is_member),
)

@poperty
def mpsks_clients(self) -> List[MPSK_Client]:
return

@property
def is_member(self) -> bool:
return self.has_property('member')
Expand Down Expand Up @@ -422,3 +427,17 @@ def last_update(self):
@property
def history(self):
return self._transactions

class MPSK_Client:

def __init__(self, name="", mac=""):
self._name = name
self._mac = mac

@property
def name(self):
return self._name

@property
def mac(self):
return self._mac

0 comments on commit 5845665

Please sign in to comment.