Passed
Pull Request — master (#209)
by
unknown
02:10
created

asyncua.server.users   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A User.__init__() 0 3 1
1
"""
2
Implement user management here.
3
"""
4
5
from enum import Enum
6
7
8
class UserRole(Enum):
9
    """
10
    User Roles
11
    """
12
    Admin = 0
13
    Anonymous = 1
14
    User = 3
15
16
17
class User:
18
    def __init__(self, role=UserRole.Anonymous, name=None):
19
        self.role = role
20
        self.name = name
21