nsarchive 0.1b1__py3-none-any.whl → 0.1b2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nsarchive/__init__.py +13 -4
- nsarchive/cls/entities.py +3 -3
- {nsarchive-0.1b1.dist-info → nsarchive-0.1b2.dist-info}/METADATA +1 -1
- {nsarchive-0.1b1.dist-info → nsarchive-0.1b2.dist-info}/RECORD +6 -6
- {nsarchive-0.1b1.dist-info → nsarchive-0.1b2.dist-info}/LICENSE +0 -0
- {nsarchive-0.1b1.dist-info → nsarchive-0.1b2.dist-info}/WHEEL +0 -0
nsarchive/__init__.py
CHANGED
@@ -33,9 +33,10 @@ class EntityInstance:
|
|
33
33
|
entity = Organization(id)
|
34
34
|
|
35
35
|
entity.owner = self.get_entity(_data['owner_id'].upper())
|
36
|
-
|
37
|
-
|
38
|
-
|
36
|
+
|
37
|
+
for _member in _data['members']:
|
38
|
+
member = GroupMember(_member['id'])
|
39
|
+
member.permissions.__dict__ = _member['permissions']
|
39
40
|
|
40
41
|
entity.avatar = self.avatars.get(id).read()
|
41
42
|
|
@@ -60,9 +61,17 @@ class EntityInstance:
|
|
60
61
|
|
61
62
|
if type(entity) == Organization:
|
62
63
|
_data['owner_id'] = entity.owner.id.upper() if entity.owner else "0"
|
63
|
-
_data['members'] = [
|
64
|
+
_data['members'] = []
|
64
65
|
_data['certifications'] = entity.certifications
|
65
66
|
|
67
|
+
for member in entity.members:
|
68
|
+
_member = {
|
69
|
+
'id': member.id,
|
70
|
+
'permissions': member.permissions.__dict__.copy()
|
71
|
+
}
|
72
|
+
|
73
|
+
_data['members'] += _member
|
74
|
+
|
66
75
|
self.avatars.put(name = entity.id, data = entity.avatar)
|
67
76
|
elif type(entity) == User:
|
68
77
|
_data['xp'] = entity.xp
|
nsarchive/cls/entities.py
CHANGED
@@ -56,11 +56,11 @@ class MemberPermissions:
|
|
56
56
|
for perm in permissions.values():
|
57
57
|
self.__setattr__(*perm)
|
58
58
|
|
59
|
-
class GroupMember(
|
59
|
+
class GroupMember():
|
60
60
|
def __init__(self, id: str) -> None:
|
61
|
-
|
62
|
-
|
61
|
+
self.id = id
|
63
62
|
self.permissions: MemberPermissions = MemberPermissions()
|
63
|
+
self.position: str = 'membre'
|
64
64
|
|
65
65
|
class FunctionalUser:
|
66
66
|
def __init__(self, id: str) -> None:
|
@@ -1,12 +1,12 @@
|
|
1
|
-
nsarchive/__init__.py,sha256=
|
1
|
+
nsarchive/__init__.py,sha256=bZvn2TDKBxMmPst7PJY8SqYIYUxRTeDA6QLDI7JJpss,15528
|
2
2
|
nsarchive/assets/default_avatar.png,sha256=n-4vG_WPke8LvbY3ZU6oA-H-OtRoIu7woKnRq9DCIlI,51764
|
3
3
|
nsarchive/cls/archives.py,sha256=5C66pXuXAANRXNDqNTvIepRtUrXIWOL7ymmYiBHsHAY,1720
|
4
4
|
nsarchive/cls/bank.py,sha256=OactEpRn8PGv7BwnBUbMpzgHqrvv4yx526AMzh9uBO8,220
|
5
|
-
nsarchive/cls/entities.py,sha256=
|
5
|
+
nsarchive/cls/entities.py,sha256=Gv6nNEmLXyUokQfoQgNUIjq0kLTTlPT0Wmdpw83z7gY,3499
|
6
6
|
nsarchive/cls/exceptions.py,sha256=UZ7G7AFUN5OkKAGpNl1OT7jauF1jC7WW8wWXVFt5sMs,539
|
7
7
|
nsarchive/cls/republic.py,sha256=aY79B5PZF5IErwzEjn9ito6T8gXA4trm6LmIeYu6XLM,1821
|
8
8
|
nsarchive/utils/assets.py,sha256=hd0STSpa0yT-OJlUyI_wCYXJqcBiUMQds2pZTXNNg9c,382
|
9
|
-
nsarchive-0.
|
10
|
-
nsarchive-0.
|
11
|
-
nsarchive-0.
|
12
|
-
nsarchive-0.
|
9
|
+
nsarchive-0.1b2.dist-info/LICENSE,sha256=aFLFZg6LEJFpTlNQ8su3__jw4GfV-xWBmC1cePkKZVw,35802
|
10
|
+
nsarchive-0.1b2.dist-info/METADATA,sha256=EXX1Thjma4a5aH4IZIVO5yKb3qexLml59ryC_C8YOj8,5629
|
11
|
+
nsarchive-0.1b2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
12
|
+
nsarchive-0.1b2.dist-info/RECORD,,
|
File without changes
|
File without changes
|