Skip to content

Commit

Permalink
Added MFA permission
Browse files Browse the repository at this point in the history
  • Loading branch information
dkmstr committed Nov 23, 2023
1 parent 5fab570 commit efd78dd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions server/src/uds/REST/methods/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def getClass(arg: str) -> typing.Type['Model']:
'calendars': models.Calendar,
'metapools': models.MetaPool,
'accounts': models.Account,
'mfa': models.MFA,
}.get(arg, None)

if cls is None:
Expand Down
21 changes: 11 additions & 10 deletions server/src/uds/core/util/objtype.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,17 @@ class ObjectType(enum.Enum):
STATS_EVENTS = ObjTypeInfo(12, models.StatsEvents)
CALENDAR = ObjTypeInfo(13, models.Calendar)
CALENDAR_RULE = ObjTypeInfo(14, models.CalendarRule)
# PROXY_TYPE = (15, models.Proxy) has been removed
METAPOOL = ObjTypeInfo(16, models.MetaPool)
ACCOUNT = ObjTypeInfo(17, models.Account)
REGISTERED_SERVER = ObjTypeInfo(19, models.Server)
ACCOUNT_USAGE = ObjTypeInfo(20, models.AccountUsage)
IMAGE = ObjTypeInfo(21, models.Image)
LOG = ObjTypeInfo(22, models.Log)
NOTIFICATION = ObjTypeInfo(23, models.Notification)
TICKET_STORE = ObjTypeInfo(24, models.TicketStore)
REGISTERED_SERVER_GROUP = ObjTypeInfo(26, models.ServerGroup)
METAPOOL = ObjTypeInfo(15, models.MetaPool)
ACCOUNT = ObjTypeInfo(16, models.Account)
# Actor and Tunnel tokens are now on REGISTERED_SERVER, so removed
MFA = ObjTypeInfo(19, models.MFA)
REGISTERED_SERVER = ObjTypeInfo(20, models.Server)
REGISTERED_SERVER_GROUP = ObjTypeInfo(21, models.ServerGroup)
ACCOUNT_USAGE = ObjTypeInfo(22, models.AccountUsage)
IMAGE = ObjTypeInfo(23, models.Image)
LOG = ObjTypeInfo(24, models.Log)
NOTIFICATION = ObjTypeInfo(25, models.Notification)
TICKET_STORE = ObjTypeInfo(26, models.TicketStore)

@property
def model(self) -> typing.Type['Model']:
Expand Down

0 comments on commit efd78dd

Please sign in to comment.