OXIESEC PANEL
- Current Dir:
/
/
snap
/
core20
/
2582
/
usr
/
share
/
subiquity
/
console_conf
/
models
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
04/29/2025 04:07:53 PM
rwxr-xr-x
📄
__init__.py
2 bytes
04/20/2020 02:31:39 PM
rw-r--r--
📁
__pycache__
-
04/29/2025 04:07:53 PM
rwxr-xr-x
📄
console_conf.py
299 bytes
04/20/2020 02:31:39 PM
rw-r--r--
📄
identity.py
1.2 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
systems.py
7.09 KB
04/20/2020 02:31:39 PM
rw-r--r--
📁
tests
-
04/29/2025 04:07:53 PM
rwxr-xr-x
Editing: identity.py
Close
# Copyright 2015 Canonical, Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 3. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. import logging import attr log = logging.getLogger('console_conf.models.identity') @attr.s class User(object): realname = attr.ib() username = attr.ib() homedir = attr.ib(default=None) fingerprints = attr.ib(init=False, default=[]) class IdentityModel(object): """ Model representing user identity """ def __init__(self): self._user = None def add_user(self, result): result = result.copy() self._user = User(**result) @property def user(self): return self._user def __repr__(self): return "<LocalUser: {}>".format(self.user)