Skip to content
Snippets Groups Projects
Commit 0a2fb5f0 authored by sveseli's avatar sveseli
Browse files

use standard constructor form for authorization principal

parent 0a5840bc
No related branches found
No related tags found
No related merge requests found
......@@ -4,8 +4,14 @@ from dmObject import DmObject
class AuthorizationPrincipal(DmObject):
def __init__(self, name, token=None, userInfo={}):
DmObject.__init__(self,{'name' : name, 'token' : token, 'userInfo' : userInfo})
def __init__(self, dict={}, name=None, token=None, userInfo={}):
DmObject.__init__(self, dict)
if name is not None:
self['name'] = name
if token is not None:
self['token'] = token
if userInfo is not None and len(userInfo):
self['userInfo'] = userInfo
def getName(self):
return self.get('name')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment