diff --git a/docs/example-data.json b/docs/example-data.json index 506ca36f3..31e9ed8ac 100644 --- a/docs/example-data.json +++ b/docs/example-data.json @@ -21,6 +21,7 @@ "last_name": "Administrator", "is_active": true, "is_committee": false, + "password": "1422e767c5e08bb7196844025a0f98e1x61Ey612Kl2gpFL56FT9weDnpSo4AV8j8+qx2AuTHdRyY036xxzTTrw10Wq3+4qQyB+XURPWx1ONxp3Y3pB37A==", "default_password": "admin", "about_me": "", "gender": "", @@ -35,7 +36,7 @@ "is_present_in_meeting_ids": [1], "meeting_id": null, - "guest_meeting_id": null, + "guest_meeting_id": [], "committee_as_member_ids": [], "committee_as_manager_ids": [], @@ -70,6 +71,7 @@ "last_name": "", "is_active": true, "is_committee": false, + "password": "7f0d953dadfddb2005da4c04037abf61H0D8ktokFpR1CXnubPWC8tXX0o4YM13gWrxU0FYOD1MChgxlK/CNVgJSql50IQVG82n7u86MEs/HlXsmUv6adQ==", "default_password": "a", "about_me": "", "gender": "", @@ -84,7 +86,7 @@ "is_present_in_meeting_ids": [], "meeting_id": null, - "guest_meeting_id": null, + "guest_meeting_id": [], "committee_as_member_ids": [], "committee_as_manager_ids": [], @@ -115,6 +117,7 @@ "last_name": "", "is_active": true, "is_committee": false, + "password": "a7ba62036711bbd11163661547947f23Umd2iCLuYk1I/OFexcp5y9YCy39MIVelFlVpkfIu+Me173sY0f9BxZNw77CFhlHUSpNsEbexRMSP4E3zxqPo2g==", "default_password": "jKwSLGCk", "about_me": "", "gender": "", @@ -129,7 +132,7 @@ "is_present_in_meeting_ids": [], "meeting_id": null, - "guest_meeting_id": null, + "guest_meeting_id": [1], "committee_as_member_ids": [], "committee_as_manager_ids": [], @@ -247,7 +250,7 @@ "motions_amendments_prefix": "-", "motions_amendments_text_mode": "freestyle", "motions_amendments_multiple_paragraphs": true, - "motions_supporters_min_amount": 0, + "motions_supporters_min_amount": 1, "motions_supporters_autoremove": false, "motions_export_title": "Motions", "motions_export_preamble": "", @@ -314,15 +317,18 @@ "default_meeting_for_committee_id": 1, "present_user_ids": [1], "temorary_user_ids": [], - "guest_ids": [], - "reference_projector_id": 2 + "guest_ids": [3], + "reference_projector_id": 2, + + "default_group_id": 1, + "superadmin_group_id": 2 }], "group": [ { "id": 1, "name": "Default", - "is_superadmin_group": false, - "is_default_group": true, + "superadmin_group_for_meeting_id": null, + "default_group_for_meeting_id": 1, "permissions": [ "agenda.can_see", "agenda.can_see_internal_items", @@ -347,12 +353,13 @@ { "id": 2, "name": "Admin", - "is_superadmin_group": true, - "is_default_group": false, + "superadmin_group_for_meeting_id": 1, + "default_group_for_meeting_id": null, "permissions": [], "user_ids": [1], - "mediafile_access_group_ids": [], + "mediafile_access_group_ids": [1], + "mediafile_inherited_access_group_ids": [1, 3], "read_comment_section_ids": [], "write_comment_section_ids": [], "motion_poll_ids": [], @@ -364,8 +371,8 @@ { "id": 3, "name": "Staff", - "is_superadmin_group": false, - "is_default_group": false, + "superadmin_group_for_meeting_id": null, + "default_group_for_meeting_id": null, "permissions": [ "agenda.can_manage", "agenda.can_see", @@ -390,7 +397,8 @@ ], "user_ids": [], - "mediafile_access_group_ids": [], + "mediafile_access_group_ids": [1], + "mediafile_inherited_access_group_ids": [1, 3], "read_comment_section_ids": [1], "write_comment_section_ids": [1], "motion_poll_ids": [], @@ -402,8 +410,8 @@ { "id": 5, "name": "Committees", - "is_superadmin_group": false, - "is_default_group": false, + "superadmin_group_for_meeting_id": null, + "default_group_for_meeting_id": null, "permissions": [ "agenda.can_see", "agenda.can_see_internal_items", @@ -430,8 +438,8 @@ { "id": 6, "name": "Delegates", - "is_superadmin_group": false, - "is_default_group": false, + "superadmin_group_for_meeting_id": null, + "default_group_for_meeting_id": null, "permissions": [ "agenda.can_see", "agenda.can_see_internal_items", @@ -2115,9 +2123,10 @@ "pdf_information": {}, "create_timestamp": 1584513763, "path": "logos/", - "inherited_access_groups_id": [2, 3], + "has_inherited_access_groups": true, "access_groups_id": [2, 3], + "inherited_access_groups_id": [2, 3], "parent_id": null, "child_ids": [3], "list_of_speakers_id": 16, @@ -2139,9 +2148,10 @@ "pdf_information": {}, "create_timestamp": 1584513771, "path": "A.txt", - "inherited_access_groups_id": true, + "has_inherited_access_groups": false, "access_groups_id": [], + "inherited_access_groups_id": [], "parent_id": null, "child_ids": [], "list_of_speakers_id": 17, @@ -2157,15 +2167,16 @@ "id": 3, "title": "in.jpg", "is_directory": false, - "filesize": 125820, + "filesize": 1462, "filename": "in.jpg", - "mimetype": "image/jpeg", + "mimetype": "image/png", "pdf_information": {}, "create_timestamp": 1584513791, "path": "logos/in.jpg", - "inherited_access_groups_id": [2, 3], + "has_inherited_access_groups": true, "access_groups_id": [], + "inherited_access_groups_id": [2, 3], "parent_id": 1, "child_ids": [], "list_of_speakers_id": 18, diff --git a/docs/interfaces/autoupdate-service.txt b/docs/interfaces/autoupdate-service.txt index 2ae5df460..1fef519bc 100644 --- a/docs/interfaces/autoupdate-service.txt +++ b/docs/interfaces/autoupdate-service.txt @@ -119,7 +119,12 @@ Interface RelationFieldDescriptor extends Fields { * null` without using this interface, the response would be just the template * field `B_$_ids` and no structured fields. * - * For just resolving values, leav `values` out (hence the optional parameter). + * For just resolving values, leave `values` out (hence the optional parameter). + * + * For retrieveing a single structured field, use `RelationFieldDescriptor`. E.g. + * when trying to get the groups for a user from meeting 2, use `group_2_ids` + * directly and do not bother with structured fields. The terminology is a + * `specific structured field`. * * If the values of all structured fields are references, use the `values` * parameter analog to the `fields` paramter as documented in @@ -127,12 +132,7 @@ Interface RelationFieldDescriptor extends Fields { */ Interface StructuredFieldDecriptor { type: 'template', - values?: { - [field: Field]: GenericRelationFieldDescriptor - | RelationFieldDescriptor - | StructuredFieldDescriptor - | null; - } + values?: GenericRelationFieldDescriptor | RelationFieldDescriptor; } diff --git a/docs/models.txt b/docs/models.txt index dd0e8035a..0c71eb8e5 100644 --- a/docs/models.txt +++ b/docs/models.txt @@ -48,7 +48,7 @@ Interface user { last_name: string; is_active: boolean; is_committee: boolean; - // TODO: auth + password: string; default_password: string; about_me: HTML; gender: string, @@ -107,13 +107,10 @@ Interface role { } // New: Resource -// Resources are meeting-specific or organsation wide. -// For organisation-resources, no permission chacks are done (event the user -// must not be logged in). If a meeting-resource is requested, it is checked, if -// the user can see the meeting (Anonymous, guest, member). -// A resource has a token, e.g. `web_header` or `pdf_font_italic`, so the client -// knowns, where to put the resource. They are delivered by the mediafile server -// with the URL `/resource/` +// Resources are organsation wide "mediafiles", like logos for the organisatio or +// organisation-wide fonts. Therefore, no permission checks are done and the user +// must not be logged in to retrieve files. A resource has a token, e.g. `web_header` +// or `pdf_font_italic`, so the client knowns, where to put the resource. Interface resource { id: number; token: string; @@ -310,17 +307,21 @@ Interface meeting { temporary_user_ids: (user/meeting_id)[]; guest_ids: (user/guest_meeting_ids)[]; reference_projector_id: projector/used_as_reference_projector_meeting_id; + + default_group_id: group/default_group_for_meeting_id; + superadmin_group_id: group/superadmin_group_for_meeting_id; } Interface group { id: number; name: string; - is_superadmin_group: boolean; - is_default_group: boolean; permissions: string[]; user_ids: (user/group_$_ids)[]; + default_group_for_meeting_id: meeting/default_group_id; + superadmin_group_for_meeting_id: meeting/superadmin_group_id; mediafile_access_group_ids: (mediafile/access_group_ids)[]; + mediafile_inherited_access_group_ids: (mediafile/inherited_access_group_ids)[]; read_comment_section_ids: (motion_comment_section/read_group_ids)[]; write_comment_section_ids: (motion_comment_section/write_group_ids)[]; motion_poll_ids: (motion_poll/entitled_group_ids)[]; @@ -685,10 +686,10 @@ Interface mediafile { mimetype: string; pdf_information: JSON; create_timestamp: datetime; - path: string; // Note: calcuated - inherited_access_group_ids: boolean | number[]; // Note: calculated and no - // reverse-relation for the group ids. + path: string; // Note: calculated + has_inherited_access_groups: boolean; // Note: calculated + inherited_access_group_ids: (group/mediafile_inherited_access_group_ids)[]; // Note: calculated access_group_ids: (group/mediafile_access_group_ids)[]; parent_id: mediafile/child_ids; child_ids: (mediafile/parent_id)[];