Remodel users

This commit is contained in:
Finn Stutzenstein 2021-04-26 13:20:30 +02:00
parent 09ba505277
commit be883f2a0d
No known key found for this signature in database
GPG Key ID: 9042F605C6324654
3 changed files with 70 additions and 78 deletions

View File

@ -37,11 +37,11 @@
"is_demo_user": false,
"organisation_management_level": "superadmin",
"is_present_in_meeting_ids": [],
"meeting_id": null,
"guest_meeting_ids": [],
"committee_as_member_ids": [],
"committee_as_manager_ids": [],
"committee_ids": [1],
"committee_$_management_level": ["1"],
"committee_$1_management_level": "can_manage",
"comment_$": [],
"number_$": [],
@ -63,7 +63,9 @@
"projection_$_ids": [],
"current_projector_$_ids": [],
"vote_delegated_$_to_id": [],
"vote_delegations_$_from_ids": []
"vote_delegations_$_from_ids": [],
"meeting_ids": [1]
}],
"resource": [],
"organisation_tag": [],
@ -76,8 +78,7 @@
"meeting_ids": [1],
"template_meeting_id": null,
"default_meeting_id": 1,
"member_ids": [],
"manager_ids": [],
"user_ids": [1],
"forward_to_committee_ids": [],
"receive_forwardings_from_committee_ids": [],
"organisation_tag_ids": [],
@ -250,8 +251,6 @@
"default_meeting_for_committee_id": 1,
"organisation_tag_ids": [],
"present_user_ids": [],
"temporary_user_ids": [],
"guest_ids": [],
"user_ids": [1],
"reference_projector_id": 1,
"list_of_speakers_countdown_id": 1,

View File

@ -38,11 +38,10 @@
"organisation_management_level": "superadmin",
"is_present_in_meeting_ids": [1],
"meeting_id": null,
"guest_meeting_ids": [],
"committee_as_member_ids": [],
"committee_as_manager_ids": [],
"committee_ids": [1],
"committee_$_management_level": ["1"],
"committee_$1_management_level": "can_manage",
"comment_$": ["1"],
"comment_$1": "Test comment",
"number_$": ["1"],
@ -76,7 +75,9 @@
"vote_delegated_vote_$_ids": ["1"],
"vote_delegated_vote_$1_ids": [7],
"vote_delegated_$_to_id": [],
"vote_delegations_$_from_ids": []
"vote_delegations_$_from_ids": [],
"meeting_ids": [1]
},
{
"id": 2,
@ -99,10 +100,8 @@
"organisation_management_level": "",
"is_present_in_meeting_ids": [],
"meeting_id": null,
"guest_meeting_ids": [],
"committee_as_member_ids": [],
"committee_as_manager_ids": [],
"committee_ids": [1],
"committee_$_management_level": [],
"comment_$": ["1"],
"comment_$1": "Test comment a",
@ -116,7 +115,7 @@
"vote_weight_$1": "1.000000",
"group_$_ids": ["1"],
"group_$1_ids": [6],
"group_$1_ids": [5],
"speaker_$_ids": ["1"],
"speaker_$1_ids": [2, 3, 7, 10, 11, 13],
"personal_note_$_ids": [],
@ -132,7 +131,9 @@
"current_projector_$_ids": [],
"vote_delegated_vote_$_ids": [],
"vote_delegated_$_to_id": [],
"vote_delegations_$_from_ids": []
"vote_delegations_$_from_ids": [],
"meeting_ids": [1]
},
{
"id": 3,
@ -155,10 +156,8 @@
"organisation_management_level": "",
"is_present_in_meeting_ids": [],
"meeting_id": null,
"guest_meeting_ids": [1],
"committee_as_member_ids": [],
"committee_as_manager_ids": [],
"committee_ids": [],
"committee_$_management_level": [],
"comment_$": ["1"],
"comment_$1": "Test comment b as guest",
@ -171,7 +170,8 @@
"vote_weight_$": ["1"],
"vote_weight_$1": "1.000000",
"group_$_ids": [],
"group_$_ids": ["1"],
"group_$1_ids": [5],
"speaker_$_ids": ["1"],
"speaker_$1_ids": [4, 8, 9],
"personal_note_$_ids": [],
@ -188,7 +188,9 @@
"current_projector_$_ids": [],
"vote_delegated_vote_$_ids": [],
"vote_delegated_$_to_id": [],
"vote_delegations_$_from_ids": []
"vote_delegations_$_from_ids": [],
"meeting_ids": [1]
}],
"resource": [
{
@ -217,8 +219,7 @@
"meeting_ids": [1],
"template_meeting_id": null,
"default_meeting_id": 1,
"member_ids": [],
"manager_ids": [],
"user_ids": [1, 2],
"forward_to_committee_ids": [],
"receive_forwardings_from_committee_ids": [],
"organisation_tag_ids": [1],
@ -392,8 +393,6 @@
"default_meeting_for_committee_id": 1,
"organisation_tag_ids": [1],
"present_user_ids": [1],
"temporary_user_ids": [],
"guest_ids": [3],
"user_ids": [1, 2, 3],
"reference_projector_id": 2,
"list_of_speakers_countdown_id": 1,
@ -567,7 +566,7 @@
"user.can_change_own_password"
],
"user_ids": [2],
"user_ids": [2, 3],
"mediafile_access_group_ids": [],
"mediafile_inherited_access_group_ids": [],
"read_comment_section_ids": [1],

View File

@ -46,10 +46,10 @@
# - There are template fields (see autoupdate service interface) with a `$` as
# the placeholder.
# - The type `template` describes a structured field for the given model. If the
# property `replacement` is given, it describes which field of the same model
# is used as the replacement (=> structured relation). If it not given, the field
# is a structured tag. The property `fields` contains the definition for all the
# fields that come from the template field.
# property `replacement_collection` is given, it describes which model the
# replacement ids are belonging to (=> structured relation). If it is not given,
# the field is a structured tag. The property `fields` contains the definition
# for all the fields that come from the template field.
# JSON Schema Properties:
# - You can add JSON Schema properties to the fields like `enum`, `description`,
# `maxLength` and `minimum`
@ -126,40 +126,38 @@ user:
is_present_in_meeting_ids:
type: relation-list
to: meeting/present_user_ids
meeting_id:
type: relation
to: meeting/temporary_user_ids # Temporary users
guest_meeting_ids:
committee_ids:
type: relation-list
to: meeting/guest_ids # Guests in meetings
committee_as_member_ids:
type: relation-list
to: committee/member_ids
committee_as_manager_ids:
type: relation-list
to: committee/manager_ids
to: committee/user_ids
# committee specific permissions
committee_$_management_level:
type: template
replacement_collection: committee
description: Hierarchical permission level for the each committee organisation.
enum:
- can_manage
# Meeting specific personal data
# Replacement is the meeting id but it is not a structured relation.
comment_$:
type: template
replacement: meeting_id
replacement_collection: meeting
fields: HTMLStrict
number_$:
type: template
replacement: meeting_id
replacement_collection: meeting
fields: string
structure_level_$:
type: template
replacement: meeting_id
replacement_collection: meeting
fields: string
about_me_$:
type: template
replacement: meeting_id
replacement_collection: meeting
fields: HTMLStrict
vote_weight_$:
type: template
replacement: meeting_id
replacement_collection: meeting
fields: decimal(6)
# All foreign keys are meeting-specific:
@ -170,84 +168,89 @@ user:
# the need to get all groups and filter them for the meeting
group_$_ids:
type: template
replacement: meeting_id
replacement_collection: meeting
fields:
type: relation-list
to: group/user_ids
speaker_$_ids:
type: template
replacement: meeting_id
replacement_collection: meeting
fields:
type: relation-list
to: speaker/user_id
personal_note_$_ids:
type: template
replacement: meeting_id
replacement_collection: meeting
fields:
type: relation-list
to: personal_note/user_id
on_delete: CASCADE
supported_motion_$_ids:
type: template
replacement: meeting_id
replacement_collection: meeting
fields:
type: relation-list
to: motion/supporter_ids
submitted_motion_$_ids:
type: template
replacement: meeting_id
replacement_collection: meeting
fields:
type: relation-list
to: motion_submitter/user_id
poll_voted_$_ids:
type: template
replacement: meeting_id
replacement_collection: meeting
fields:
type: relation-list
to: poll/voted_ids
option_$_ids:
type: template
replacement: meeting_id
replacement_collection: meeting
fields:
type: relation-list
to: option/content_object_id
vote_$_ids:
type: template
replacement: meeting_id
replacement_collection: meeting
fields:
type: relation-list
to: vote/user_id
vote_delegated_vote_$_ids:
type: template
replacement: meeting_id
replacement_collection: meeting
fields:
type: relation-list
to: vote/delegated_user_id
assignment_candidate_$_ids:
type: template
replacement: meeting_id
replacement_collection: meeting
fields:
type: relation-list
to: assignment_candidate/user_id
projection_$_ids:
type: template
replacement: meeting_id
replacement_collection: meeting
fields:
type: relation-list
to: projection/content_object_id
vote_delegated_$_to_id:
type: template
replacement: meeting_id
replacement_collection: meeting
fields:
type: relation
to: user/vote_delegations_$_from_ids
vote_delegations_$_from_ids:
type: template
replacement: meeting_id
replacement_collection: meeting
fields:
type: relation-list
to: user/vote_delegated_$_to_id
meeting_ids:
type: number[]
decription: Calculated. All ids from group_$_ids as integers.
read_only: true
# New: Resource
# Resources are organsation wide "mediafiles", like logos for the organisatio or
# organisation-wide fonts. Therefore, no permission checks are done and the user
@ -300,12 +303,9 @@ committee:
default_meeting_id:
type: relation
to: meeting/default_meeting_for_committee_id
member_ids:
user_ids:
type: relation-list
to: user/committee_as_member_ids
manager_ids:
type: relation-list
to: user/committee_as_manager_ids
to: user/committee_ids
forward_to_committee_ids:
type: relation-list
to: committee/receive_forwardings_from_committee_ids
@ -868,15 +868,9 @@ meeting:
present_user_ids:
type: relation-list
to: user/is_present_in_meeting_ids
temporary_user_ids:
type: relation-list
to: user/meeting_id
guest_ids:
type: relation-list
to: user/guest_meeting_ids
user_ids:
type: number[]
decription: Calculated. All ids from temporary_user_ids, guest_ids and all users assigned to groups.
decription: Calculated. All user ids from all users assigned to groups of this meeting.
read_only: true
reference_projector_id:
type: relation