From 0c5eac4eb690bbc9d1b24d4372cfde683493dc4d Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Fri, 29 Sep 2023 14:54:05 +0200 Subject: [PATCH 1/2] Add restrictor for import_preview --- environment.md | 1 - internal/restrict/collection/collection.go | 1 + .../restrict/collection/import_preview.go | 38 + internal/restrict/field_def.go | 7 + internal/restrict/restrict.go | 1 + pkg/datastore/dsfetch/fields_generated.go | 45 + pkg/datastore/dskey/gen_collection_fields.go | 1506 +++++++++-------- 7 files changed, 854 insertions(+), 745 deletions(-) create mode 100644 internal/restrict/collection/import_preview.go diff --git a/environment.md b/environment.md index c59a4fc6..f57b357e 100644 --- a/environment.md +++ b/environment.md @@ -33,4 +33,3 @@ The Service uses the following environment variables: * `METRIC_INTERVAL`: Time in how often the metrics are gathered. Zero disables the metrics. The default is `5m`. * `METRIC_SAVE_INTERVAL`: Interval, how often the metric should be saved to redis. Redis will ignore entries, that are twice at old then the save interval. The default is `5m`. * `DISABLE_CONNECTION_COUNT`: Do not count connections. The default is `false`. -* `ENABLE_PROFILE_ROUTES`: Activate development routes for profiling. The default is `false`. diff --git a/internal/restrict/collection/collection.go b/internal/restrict/collection/collection.go index 15ca9297..f02c1438 100644 --- a/internal/restrict/collection/collection.go +++ b/internal/restrict/collection/collection.go @@ -170,6 +170,7 @@ var collectionMap = map[string]Restricter{ ChatMessage{}.Name(): ChatMessage{}, Committee{}.Name(): Committee{}, Group{}.Name(): Group{}, + ImportPreview{}.Name(): ImportPreview{}, Mediafile{}.Name(): Mediafile{}, Meeting{}.Name(): Meeting{}, MeetingUser{}.Name(): MeetingUser{}, diff --git a/internal/restrict/collection/import_preview.go b/internal/restrict/collection/import_preview.go new file mode 100644 index 00000000..4b7230f2 --- /dev/null +++ b/internal/restrict/collection/import_preview.go @@ -0,0 +1,38 @@ +package collection + +import ( + "context" + "errors" + + "github.com/OpenSlides/openslides-autoupdate-service/pkg/datastore/dsfetch" +) + +// ImportPreview handels restrictions of the collection import_preview. +// +// The user can see a import_preview, if TODO +// +// Mode A: The user can see the import_preview. +type ImportPreview struct{} + +// Name returns the collection name. +func (i ImportPreview) Name() string { + return "import_preview" +} + +// MeetingID returns the meetingID for the object. +func (i ImportPreview) MeetingID(ctx context.Context, ds *dsfetch.Fetch, id int) (int, bool, error) { + return 0, false, nil +} + +// Modes returns the field restricters for the collection. +func (i ImportPreview) Modes(mode string) FieldRestricter { + switch mode { + case "A": + return i.see + } + return nil +} + +func (i ImportPreview) see(ctx context.Context, ds *dsfetch.Fetch, importPreviewIDs ...int) ([]int, error) { + return nil, errors.New("TODO") +} diff --git a/internal/restrict/field_def.go b/internal/restrict/field_def.go index 44979744..1faf9abc 100644 --- a/internal/restrict/field_def.go +++ b/internal/restrict/field_def.go @@ -453,6 +453,13 @@ var restrictionModes = map[string]string{ "group/write_chat_group_ids": "A", "group/write_comment_section_ids": "A", + // import_preview + "import_preview/created": "A", + "import_preview/id": "A", + "import_preview/name": "A", + "import_preview/result": "A", + "import_preview/state": "A", + // list_of_speakers "list_of_speakers/closed": "A", "list_of_speakers/content_object_id": "A", diff --git a/internal/restrict/restrict.go b/internal/restrict/restrict.go index ac41ff5a..960e3f78 100644 --- a/internal/restrict/restrict.go +++ b/internal/restrict/restrict.go @@ -577,4 +577,5 @@ var collectionOrder = map[string]int{ "user": 38, "meeting_user": 39, "action_worker": 40, + "import_preview": 41, } diff --git a/pkg/datastore/dsfetch/fields_generated.go b/pkg/datastore/dsfetch/fields_generated.go index 9aa141af..be79afbb 100644 --- a/pkg/datastore/dsfetch/fields_generated.go +++ b/pkg/datastore/dsfetch/fields_generated.go @@ -1463,6 +1463,51 @@ func (r *Fetch) Group_WriteCommentSectionIDs(groupID int) *ValueIntSlice { return &ValueIntSlice{fetch: r, key: key} } +func (r *Fetch) ImportPreview_Created(importPreviewID int) *ValueInt { + key, err := dskey.FromParts("import_preview", importPreviewID, "created") + if err != nil { + return &ValueInt{err: err} + } + + return &ValueInt{fetch: r, key: key, required: true} +} + +func (r *Fetch) ImportPreview_ID(importPreviewID int) *ValueInt { + key, err := dskey.FromParts("import_preview", importPreviewID, "id") + if err != nil { + return &ValueInt{err: err} + } + + return &ValueInt{fetch: r, key: key} +} + +func (r *Fetch) ImportPreview_Name(importPreviewID int) *ValueString { + key, err := dskey.FromParts("import_preview", importPreviewID, "name") + if err != nil { + return &ValueString{err: err} + } + + return &ValueString{fetch: r, key: key, required: true} +} + +func (r *Fetch) ImportPreview_Result(importPreviewID int) *ValueJSON { + key, err := dskey.FromParts("import_preview", importPreviewID, "result") + if err != nil { + return &ValueJSON{err: err} + } + + return &ValueJSON{fetch: r, key: key} +} + +func (r *Fetch) ImportPreview_State(importPreviewID int) *ValueString { + key, err := dskey.FromParts("import_preview", importPreviewID, "state") + if err != nil { + return &ValueString{err: err} + } + + return &ValueString{fetch: r, key: key, required: true} +} + func (r *Fetch) ListOfSpeakers_Closed(listOfSpeakersID int) *ValueBool { key, err := dskey.FromParts("list_of_speakers", listOfSpeakersID, "closed") if err != nil { diff --git a/pkg/datastore/dskey/gen_collection_fields.go b/pkg/datastore/dskey/gen_collection_fields.go index f95e1be5..bca6ec1b 100644 --- a/pkg/datastore/dskey/gen_collection_fields.go +++ b/pkg/datastore/dskey/gen_collection_fields.go @@ -103,6 +103,12 @@ var collectionFields = [...]collectionField{ {"group", "weight"}, {"group", "write_chat_group_ids"}, {"group", "write_comment_section_ids"}, + {"import_preview", "A"}, + {"import_preview", "created"}, + {"import_preview", "id"}, + {"import_preview", "name"}, + {"import_preview", "result"}, + {"import_preview", "state"}, {"list_of_speakers", "A"}, {"list_of_speakers", "closed"}, {"list_of_speakers", "content_object_id"}, @@ -1051,1494 +1057,1506 @@ func collectionFieldToID(cf string) int { return 99 case "group/write_comment_section_ids": return 100 - case "list_of_speakers/A": + case "import_preview/A": return 101 - case "list_of_speakers/closed": + case "import_preview/created": return 102 - case "list_of_speakers/content_object_id": + case "import_preview/id": return 103 - case "list_of_speakers/id": + case "import_preview/name": return 104 - case "list_of_speakers/meeting_id": + case "import_preview/result": return 105 - case "list_of_speakers/projection_ids": + case "import_preview/state": return 106 - case "list_of_speakers/sequential_number": + case "list_of_speakers/A": return 107 - case "list_of_speakers/speaker_ids": + case "list_of_speakers/closed": return 108 - case "mediafile/A": + case "list_of_speakers/content_object_id": return 109 - case "mediafile/access_group_ids": + case "list_of_speakers/id": return 110 - case "mediafile/attachment_ids": + case "list_of_speakers/meeting_id": return 111 - case "mediafile/child_ids": + case "list_of_speakers/projection_ids": return 112 - case "mediafile/create_timestamp": + case "list_of_speakers/sequential_number": return 113 - case "mediafile/filename": + case "list_of_speakers/speaker_ids": return 114 - case "mediafile/filesize": + case "mediafile/A": return 115 - case "mediafile/id": + case "mediafile/access_group_ids": return 116 - case "mediafile/inherited_access_group_ids": + case "mediafile/attachment_ids": return 117 - case "mediafile/is_directory": + case "mediafile/child_ids": return 118 - case "mediafile/is_public": + case "mediafile/create_timestamp": return 119 - case "mediafile/list_of_speakers_id": + case "mediafile/filename": return 120 - case "mediafile/mimetype": + case "mediafile/filesize": return 121 - case "mediafile/owner_id": + case "mediafile/id": return 122 - case "mediafile/parent_id": + case "mediafile/inherited_access_group_ids": return 123 - case "mediafile/pdf_information": + case "mediafile/is_directory": return 124 - case "mediafile/projection_ids": + case "mediafile/is_public": return 125 - case "mediafile/title": + case "mediafile/list_of_speakers_id": return 126 - case "mediafile/token": + case "mediafile/mimetype": return 127 - case "mediafile/used_as_font_bold_in_meeting_id": + case "mediafile/owner_id": return 128 - case "mediafile/used_as_font_bold_italic_in_meeting_id": + case "mediafile/parent_id": return 129 - case "mediafile/used_as_font_chyron_speaker_name_in_meeting_id": + case "mediafile/pdf_information": return 130 - case "mediafile/used_as_font_italic_in_meeting_id": + case "mediafile/projection_ids": return 131 - case "mediafile/used_as_font_monospace_in_meeting_id": + case "mediafile/title": return 132 - case "mediafile/used_as_font_projector_h1_in_meeting_id": + case "mediafile/token": return 133 - case "mediafile/used_as_font_projector_h2_in_meeting_id": + case "mediafile/used_as_font_bold_in_meeting_id": return 134 - case "mediafile/used_as_font_regular_in_meeting_id": + case "mediafile/used_as_font_bold_italic_in_meeting_id": return 135 - case "mediafile/used_as_logo_pdf_ballot_paper_in_meeting_id": + case "mediafile/used_as_font_chyron_speaker_name_in_meeting_id": return 136 - case "mediafile/used_as_logo_pdf_footer_l_in_meeting_id": + case "mediafile/used_as_font_italic_in_meeting_id": return 137 - case "mediafile/used_as_logo_pdf_footer_r_in_meeting_id": + case "mediafile/used_as_font_monospace_in_meeting_id": return 138 - case "mediafile/used_as_logo_pdf_header_l_in_meeting_id": + case "mediafile/used_as_font_projector_h1_in_meeting_id": return 139 - case "mediafile/used_as_logo_pdf_header_r_in_meeting_id": + case "mediafile/used_as_font_projector_h2_in_meeting_id": return 140 - case "mediafile/used_as_logo_projector_header_in_meeting_id": + case "mediafile/used_as_font_regular_in_meeting_id": return 141 - case "mediafile/used_as_logo_projector_main_in_meeting_id": + case "mediafile/used_as_logo_pdf_ballot_paper_in_meeting_id": return 142 - case "mediafile/used_as_logo_web_header_in_meeting_id": + case "mediafile/used_as_logo_pdf_footer_l_in_meeting_id": return 143 - case "meeting/A": + case "mediafile/used_as_logo_pdf_footer_r_in_meeting_id": return 144 - case "meeting/B": + case "mediafile/used_as_logo_pdf_header_l_in_meeting_id": return 145 - case "meeting/C": + case "mediafile/used_as_logo_pdf_header_r_in_meeting_id": return 146 - case "meeting/admin_group_id": + case "mediafile/used_as_logo_projector_header_in_meeting_id": return 147 - case "meeting/agenda_enable_numbering": + case "mediafile/used_as_logo_projector_main_in_meeting_id": return 148 - case "meeting/agenda_item_creation": + case "mediafile/used_as_logo_web_header_in_meeting_id": return 149 - case "meeting/agenda_item_ids": + case "meeting/A": return 150 - case "meeting/agenda_new_items_default_visibility": + case "meeting/B": return 151 - case "meeting/agenda_number_prefix": + case "meeting/C": return 152 - case "meeting/agenda_numeral_system": + case "meeting/admin_group_id": return 153 - case "meeting/agenda_show_internal_items_on_projector": + case "meeting/agenda_enable_numbering": return 154 - case "meeting/agenda_show_subtitles": + case "meeting/agenda_item_creation": return 155 - case "meeting/all_projection_ids": + case "meeting/agenda_item_ids": return 156 - case "meeting/applause_enable": + case "meeting/agenda_new_items_default_visibility": return 157 - case "meeting/applause_max_amount": + case "meeting/agenda_number_prefix": return 158 - case "meeting/applause_min_amount": + case "meeting/agenda_numeral_system": return 159 - case "meeting/applause_particle_image_url": + case "meeting/agenda_show_internal_items_on_projector": return 160 - case "meeting/applause_show_level": + case "meeting/agenda_show_subtitles": return 161 - case "meeting/applause_timeout": + case "meeting/all_projection_ids": return 162 - case "meeting/applause_type": + case "meeting/applause_enable": return 163 - case "meeting/assignment_candidate_ids": + case "meeting/applause_max_amount": return 164 - case "meeting/assignment_ids": + case "meeting/applause_min_amount": return 165 - case "meeting/assignment_poll_add_candidates_to_list_of_speakers": + case "meeting/applause_particle_image_url": return 166 - case "meeting/assignment_poll_ballot_paper_number": + case "meeting/applause_show_level": return 167 - case "meeting/assignment_poll_ballot_paper_selection": + case "meeting/applause_timeout": return 168 - case "meeting/assignment_poll_default_backend": + case "meeting/applause_type": return 169 - case "meeting/assignment_poll_default_group_ids": + case "meeting/assignment_candidate_ids": return 170 - case "meeting/assignment_poll_default_method": + case "meeting/assignment_ids": return 171 - case "meeting/assignment_poll_default_onehundred_percent_base": + case "meeting/assignment_poll_add_candidates_to_list_of_speakers": return 172 - case "meeting/assignment_poll_default_type": + case "meeting/assignment_poll_ballot_paper_number": return 173 - case "meeting/assignment_poll_enable_max_votes_per_option": + case "meeting/assignment_poll_ballot_paper_selection": return 174 - case "meeting/assignment_poll_sort_poll_result_by_votes": + case "meeting/assignment_poll_default_backend": return 175 - case "meeting/assignments_export_preamble": + case "meeting/assignment_poll_default_group_ids": return 176 - case "meeting/assignments_export_title": + case "meeting/assignment_poll_default_method": return 177 - case "meeting/chat_group_ids": + case "meeting/assignment_poll_default_onehundred_percent_base": return 178 - case "meeting/chat_message_ids": + case "meeting/assignment_poll_default_type": return 179 - case "meeting/committee_id": + case "meeting/assignment_poll_enable_max_votes_per_option": return 180 - case "meeting/conference_auto_connect": + case "meeting/assignment_poll_sort_poll_result_by_votes": return 181 - case "meeting/conference_auto_connect_next_speakers": + case "meeting/assignments_export_preamble": return 182 - case "meeting/conference_enable_helpdesk": + case "meeting/assignments_export_title": return 183 - case "meeting/conference_los_restriction": + case "meeting/chat_group_ids": return 184 - case "meeting/conference_open_microphone": + case "meeting/chat_message_ids": return 185 - case "meeting/conference_open_video": + case "meeting/committee_id": return 186 - case "meeting/conference_show": + case "meeting/conference_auto_connect": return 187 - case "meeting/conference_stream_poster_url": + case "meeting/conference_auto_connect_next_speakers": return 188 - case "meeting/conference_stream_url": + case "meeting/conference_enable_helpdesk": return 189 - case "meeting/custom_translations": + case "meeting/conference_los_restriction": return 190 - case "meeting/default_group_id": + case "meeting/conference_open_microphone": return 191 - case "meeting/default_meeting_for_committee_id": + case "meeting/conference_open_video": return 192 - case "meeting/default_projector_agenda_item_list_ids": + case "meeting/conference_show": return 193 - case "meeting/default_projector_amendment_ids": + case "meeting/conference_stream_poster_url": return 194 - case "meeting/default_projector_assignment_ids": + case "meeting/conference_stream_url": return 195 - case "meeting/default_projector_assignment_poll_ids": + case "meeting/custom_translations": return 196 - case "meeting/default_projector_countdown_ids": + case "meeting/default_group_id": return 197 - case "meeting/default_projector_current_list_of_speakers_ids": + case "meeting/default_meeting_for_committee_id": return 198 - case "meeting/default_projector_list_of_speakers_ids": + case "meeting/default_projector_agenda_item_list_ids": return 199 - case "meeting/default_projector_mediafile_ids": + case "meeting/default_projector_amendment_ids": return 200 - case "meeting/default_projector_message_ids": + case "meeting/default_projector_assignment_ids": return 201 - case "meeting/default_projector_motion_block_ids": + case "meeting/default_projector_assignment_poll_ids": return 202 - case "meeting/default_projector_motion_ids": + case "meeting/default_projector_countdown_ids": return 203 - case "meeting/default_projector_motion_poll_ids": + case "meeting/default_projector_current_list_of_speakers_ids": return 204 - case "meeting/default_projector_poll_ids": + case "meeting/default_projector_list_of_speakers_ids": return 205 - case "meeting/default_projector_topic_ids": + case "meeting/default_projector_mediafile_ids": return 206 - case "meeting/description": + case "meeting/default_projector_message_ids": return 207 - case "meeting/enable_anonymous": + case "meeting/default_projector_motion_block_ids": return 208 - case "meeting/end_time": + case "meeting/default_projector_motion_ids": return 209 - case "meeting/export_csv_encoding": + case "meeting/default_projector_motion_poll_ids": return 210 - case "meeting/export_csv_separator": + case "meeting/default_projector_poll_ids": return 211 - case "meeting/export_pdf_fontsize": + case "meeting/default_projector_topic_ids": return 212 - case "meeting/export_pdf_line_height": + case "meeting/description": return 213 - case "meeting/export_pdf_page_margin_bottom": + case "meeting/enable_anonymous": return 214 - case "meeting/export_pdf_page_margin_left": + case "meeting/end_time": return 215 - case "meeting/export_pdf_page_margin_right": + case "meeting/export_csv_encoding": return 216 - case "meeting/export_pdf_page_margin_top": + case "meeting/export_csv_separator": return 217 - case "meeting/export_pdf_pagenumber_alignment": + case "meeting/export_pdf_fontsize": return 218 - case "meeting/export_pdf_pagesize": + case "meeting/export_pdf_line_height": return 219 - case "meeting/external_id": + case "meeting/export_pdf_page_margin_bottom": return 220 - case "meeting/font_bold_id": + case "meeting/export_pdf_page_margin_left": return 221 - case "meeting/font_bold_italic_id": + case "meeting/export_pdf_page_margin_right": return 222 - case "meeting/font_chyron_speaker_name_id": + case "meeting/export_pdf_page_margin_top": return 223 - case "meeting/font_italic_id": + case "meeting/export_pdf_pagenumber_alignment": return 224 - case "meeting/font_monospace_id": + case "meeting/export_pdf_pagesize": return 225 - case "meeting/font_projector_h1_id": + case "meeting/external_id": return 226 - case "meeting/font_projector_h2_id": + case "meeting/font_bold_id": return 227 - case "meeting/font_regular_id": + case "meeting/font_bold_italic_id": return 228 - case "meeting/forwarded_motion_ids": + case "meeting/font_chyron_speaker_name_id": return 229 - case "meeting/group_ids": + case "meeting/font_italic_id": return 230 - case "meeting/id": + case "meeting/font_monospace_id": return 231 - case "meeting/imported_at": + case "meeting/font_projector_h1_id": return 232 - case "meeting/is_active_in_organization_id": + case "meeting/font_projector_h2_id": return 233 - case "meeting/is_archived_in_organization_id": + case "meeting/font_regular_id": return 234 - case "meeting/jitsi_domain": + case "meeting/forwarded_motion_ids": return 235 - case "meeting/jitsi_room_name": + case "meeting/group_ids": return 236 - case "meeting/jitsi_room_password": + case "meeting/id": return 237 - case "meeting/language": + case "meeting/imported_at": return 238 - case "meeting/list_of_speakers_amount_last_on_projector": + case "meeting/is_active_in_organization_id": return 239 - case "meeting/list_of_speakers_amount_next_on_projector": + case "meeting/is_archived_in_organization_id": return 240 - case "meeting/list_of_speakers_can_set_contribution_self": + case "meeting/jitsi_domain": return 241 - case "meeting/list_of_speakers_closing_disables_point_of_order": + case "meeting/jitsi_room_name": return 242 - case "meeting/list_of_speakers_countdown_id": + case "meeting/jitsi_room_password": return 243 - case "meeting/list_of_speakers_couple_countdown": + case "meeting/language": return 244 - case "meeting/list_of_speakers_enable_point_of_order_categories": + case "meeting/list_of_speakers_amount_last_on_projector": return 245 - case "meeting/list_of_speakers_enable_point_of_order_speakers": + case "meeting/list_of_speakers_amount_next_on_projector": return 246 - case "meeting/list_of_speakers_enable_pro_contra_speech": + case "meeting/list_of_speakers_can_set_contribution_self": return 247 - case "meeting/list_of_speakers_ids": + case "meeting/list_of_speakers_closing_disables_point_of_order": return 248 - case "meeting/list_of_speakers_initially_closed": + case "meeting/list_of_speakers_countdown_id": return 249 - case "meeting/list_of_speakers_present_users_only": + case "meeting/list_of_speakers_couple_countdown": return 250 - case "meeting/list_of_speakers_show_amount_of_speakers_on_slide": + case "meeting/list_of_speakers_enable_point_of_order_categories": return 251 - case "meeting/list_of_speakers_show_first_contribution": + case "meeting/list_of_speakers_enable_point_of_order_speakers": return 252 - case "meeting/list_of_speakers_speaker_note_for_everyone": + case "meeting/list_of_speakers_enable_pro_contra_speech": return 253 - case "meeting/location": + case "meeting/list_of_speakers_ids": return 254 - case "meeting/logo_pdf_ballot_paper_id": + case "meeting/list_of_speakers_initially_closed": return 255 - case "meeting/logo_pdf_footer_l_id": + case "meeting/list_of_speakers_present_users_only": return 256 - case "meeting/logo_pdf_footer_r_id": + case "meeting/list_of_speakers_show_amount_of_speakers_on_slide": return 257 - case "meeting/logo_pdf_header_l_id": + case "meeting/list_of_speakers_show_first_contribution": return 258 - case "meeting/logo_pdf_header_r_id": + case "meeting/list_of_speakers_speaker_note_for_everyone": return 259 - case "meeting/logo_projector_header_id": + case "meeting/location": return 260 - case "meeting/logo_projector_main_id": + case "meeting/logo_pdf_ballot_paper_id": return 261 - case "meeting/logo_web_header_id": + case "meeting/logo_pdf_footer_l_id": return 262 - case "meeting/mediafile_ids": + case "meeting/logo_pdf_footer_r_id": return 263 - case "meeting/meeting_user_ids": + case "meeting/logo_pdf_header_l_id": return 264 - case "meeting/motion_block_ids": + case "meeting/logo_pdf_header_r_id": return 265 - case "meeting/motion_category_ids": + case "meeting/logo_projector_header_id": return 266 - case "meeting/motion_change_recommendation_ids": + case "meeting/logo_projector_main_id": return 267 - case "meeting/motion_comment_ids": + case "meeting/logo_web_header_id": return 268 - case "meeting/motion_comment_section_ids": + case "meeting/mediafile_ids": return 269 - case "meeting/motion_ids": + case "meeting/meeting_user_ids": return 270 - case "meeting/motion_poll_ballot_paper_number": + case "meeting/motion_block_ids": return 271 - case "meeting/motion_poll_ballot_paper_selection": + case "meeting/motion_category_ids": return 272 - case "meeting/motion_poll_default_backend": + case "meeting/motion_change_recommendation_ids": return 273 - case "meeting/motion_poll_default_group_ids": + case "meeting/motion_comment_ids": return 274 - case "meeting/motion_poll_default_onehundred_percent_base": + case "meeting/motion_comment_section_ids": return 275 - case "meeting/motion_poll_default_type": + case "meeting/motion_ids": return 276 - case "meeting/motion_state_ids": + case "meeting/motion_poll_ballot_paper_number": return 277 - case "meeting/motion_statute_paragraph_ids": + case "meeting/motion_poll_ballot_paper_selection": return 278 - case "meeting/motion_submitter_ids": + case "meeting/motion_poll_default_backend": return 279 - case "meeting/motion_workflow_ids": + case "meeting/motion_poll_default_group_ids": return 280 - case "meeting/motions_amendments_enabled": + case "meeting/motion_poll_default_onehundred_percent_base": return 281 - case "meeting/motions_amendments_in_main_list": + case "meeting/motion_poll_default_type": return 282 - case "meeting/motions_amendments_multiple_paragraphs": + case "meeting/motion_state_ids": return 283 - case "meeting/motions_amendments_of_amendments": + case "meeting/motion_statute_paragraph_ids": return 284 - case "meeting/motions_amendments_prefix": + case "meeting/motion_submitter_ids": return 285 - case "meeting/motions_amendments_text_mode": + case "meeting/motion_workflow_ids": return 286 - case "meeting/motions_block_slide_columns": + case "meeting/motions_amendments_enabled": return 287 - case "meeting/motions_default_amendment_workflow_id": + case "meeting/motions_amendments_in_main_list": return 288 - case "meeting/motions_default_line_numbering": + case "meeting/motions_amendments_multiple_paragraphs": return 289 - case "meeting/motions_default_sorting": + case "meeting/motions_amendments_of_amendments": return 290 - case "meeting/motions_default_statute_amendment_workflow_id": + case "meeting/motions_amendments_prefix": return 291 - case "meeting/motions_default_workflow_id": + case "meeting/motions_amendments_text_mode": return 292 - case "meeting/motions_enable_reason_on_projector": + case "meeting/motions_block_slide_columns": return 293 - case "meeting/motions_enable_recommendation_on_projector": + case "meeting/motions_default_amendment_workflow_id": return 294 - case "meeting/motions_enable_sidebox_on_projector": + case "meeting/motions_default_line_numbering": return 295 - case "meeting/motions_enable_text_on_projector": + case "meeting/motions_default_sorting": return 296 - case "meeting/motions_export_follow_recommendation": + case "meeting/motions_default_statute_amendment_workflow_id": return 297 - case "meeting/motions_export_preamble": + case "meeting/motions_default_workflow_id": return 298 - case "meeting/motions_export_submitter_recommendation": + case "meeting/motions_enable_reason_on_projector": return 299 - case "meeting/motions_export_title": + case "meeting/motions_enable_recommendation_on_projector": return 300 - case "meeting/motions_line_length": + case "meeting/motions_enable_sidebox_on_projector": return 301 - case "meeting/motions_number_min_digits": + case "meeting/motions_enable_text_on_projector": return 302 - case "meeting/motions_number_type": + case "meeting/motions_export_follow_recommendation": return 303 - case "meeting/motions_number_with_blank": + case "meeting/motions_export_preamble": return 304 - case "meeting/motions_preamble": + case "meeting/motions_export_submitter_recommendation": return 305 - case "meeting/motions_reason_required": + case "meeting/motions_export_title": return 306 - case "meeting/motions_recommendation_text_mode": + case "meeting/motions_line_length": return 307 - case "meeting/motions_recommendations_by": + case "meeting/motions_number_min_digits": return 308 - case "meeting/motions_show_referring_motions": + case "meeting/motions_number_type": return 309 - case "meeting/motions_show_sequential_number": + case "meeting/motions_number_with_blank": return 310 - case "meeting/motions_statute_recommendations_by": + case "meeting/motions_preamble": return 311 - case "meeting/motions_statutes_enabled": + case "meeting/motions_reason_required": return 312 - case "meeting/motions_supporters_min_amount": + case "meeting/motions_recommendation_text_mode": return 313 - case "meeting/name": + case "meeting/motions_recommendations_by": return 314 - case "meeting/option_ids": + case "meeting/motions_show_referring_motions": return 315 - case "meeting/organization_tag_ids": + case "meeting/motions_show_sequential_number": return 316 - case "meeting/personal_note_ids": + case "meeting/motions_statute_recommendations_by": return 317 - case "meeting/point_of_order_category_ids": + case "meeting/motions_statutes_enabled": return 318 - case "meeting/poll_ballot_paper_number": + case "meeting/motions_supporters_min_amount": return 319 - case "meeting/poll_ballot_paper_selection": + case "meeting/name": return 320 - case "meeting/poll_candidate_ids": + case "meeting/option_ids": return 321 - case "meeting/poll_candidate_list_ids": + case "meeting/organization_tag_ids": return 322 - case "meeting/poll_countdown_id": + case "meeting/personal_note_ids": return 323 - case "meeting/poll_couple_countdown": + case "meeting/point_of_order_category_ids": return 324 - case "meeting/poll_default_backend": + case "meeting/poll_ballot_paper_number": return 325 - case "meeting/poll_default_group_ids": + case "meeting/poll_ballot_paper_selection": return 326 - case "meeting/poll_default_method": + case "meeting/poll_candidate_ids": return 327 - case "meeting/poll_default_onehundred_percent_base": + case "meeting/poll_candidate_list_ids": return 328 - case "meeting/poll_default_type": + case "meeting/poll_countdown_id": return 329 - case "meeting/poll_ids": + case "meeting/poll_couple_countdown": return 330 - case "meeting/poll_sort_poll_result_by_votes": + case "meeting/poll_default_backend": return 331 - case "meeting/present_user_ids": + case "meeting/poll_default_group_ids": return 332 - case "meeting/projection_ids": + case "meeting/poll_default_method": return 333 - case "meeting/projector_countdown_default_time": + case "meeting/poll_default_onehundred_percent_base": return 334 - case "meeting/projector_countdown_ids": + case "meeting/poll_default_type": return 335 - case "meeting/projector_countdown_warning_time": + case "meeting/poll_ids": return 336 - case "meeting/projector_ids": + case "meeting/poll_sort_poll_result_by_votes": return 337 - case "meeting/projector_message_ids": + case "meeting/present_user_ids": return 338 - case "meeting/reference_projector_id": + case "meeting/projection_ids": return 339 - case "meeting/speaker_ids": + case "meeting/projector_countdown_default_time": return 340 - case "meeting/start_time": + case "meeting/projector_countdown_ids": return 341 - case "meeting/tag_ids": + case "meeting/projector_countdown_warning_time": return 342 - case "meeting/template_for_organization_id": + case "meeting/projector_ids": return 343 - case "meeting/topic_ids": + case "meeting/projector_message_ids": return 344 - case "meeting/topic_poll_default_group_ids": + case "meeting/reference_projector_id": return 345 - case "meeting/user_ids": + case "meeting/speaker_ids": return 346 - case "meeting/users_allow_self_set_present": + case "meeting/start_time": return 347 - case "meeting/users_email_body": + case "meeting/tag_ids": return 348 - case "meeting/users_email_replyto": + case "meeting/template_for_organization_id": return 349 - case "meeting/users_email_sender": + case "meeting/topic_ids": return 350 - case "meeting/users_email_subject": + case "meeting/topic_poll_default_group_ids": return 351 - case "meeting/users_enable_presence_view": + case "meeting/user_ids": return 352 - case "meeting/users_enable_vote_delegations": + case "meeting/users_allow_self_set_present": return 353 - case "meeting/users_enable_vote_weight": + case "meeting/users_email_body": return 354 - case "meeting/users_pdf_welcometext": + case "meeting/users_email_replyto": return 355 - case "meeting/users_pdf_welcometitle": + case "meeting/users_email_sender": return 356 - case "meeting/users_pdf_wlan_encryption": + case "meeting/users_email_subject": return 357 - case "meeting/users_pdf_wlan_password": + case "meeting/users_enable_presence_view": return 358 - case "meeting/users_pdf_wlan_ssid": + case "meeting/users_enable_vote_delegations": return 359 - case "meeting/vote_ids": + case "meeting/users_enable_vote_weight": return 360 - case "meeting/welcome_text": + case "meeting/users_pdf_welcometext": return 361 - case "meeting/welcome_title": + case "meeting/users_pdf_welcometitle": return 362 - case "meeting_user/A": + case "meeting/users_pdf_wlan_encryption": return 363 - case "meeting_user/B": + case "meeting/users_pdf_wlan_password": return 364 - case "meeting_user/D": + case "meeting/users_pdf_wlan_ssid": return 365 - case "meeting_user/about_me": + case "meeting/vote_ids": return 366 - case "meeting_user/assignment_candidate_ids": + case "meeting/welcome_text": return 367 - case "meeting_user/chat_message_ids": + case "meeting/welcome_title": return 368 - case "meeting_user/comment": + case "meeting_user/A": return 369 - case "meeting_user/group_ids": + case "meeting_user/B": return 370 - case "meeting_user/id": + case "meeting_user/D": return 371 - case "meeting_user/meeting_id": + case "meeting_user/about_me": return 372 - case "meeting_user/motion_submitter_ids": + case "meeting_user/assignment_candidate_ids": return 373 - case "meeting_user/number": + case "meeting_user/chat_message_ids": return 374 - case "meeting_user/personal_note_ids": + case "meeting_user/comment": return 375 - case "meeting_user/speaker_ids": + case "meeting_user/group_ids": return 376 - case "meeting_user/structure_level": + case "meeting_user/id": return 377 - case "meeting_user/supported_motion_ids": + case "meeting_user/meeting_id": return 378 - case "meeting_user/user_id": + case "meeting_user/motion_submitter_ids": return 379 - case "meeting_user/vote_delegated_to_id": + case "meeting_user/number": return 380 - case "meeting_user/vote_delegations_from_ids": + case "meeting_user/personal_note_ids": return 381 - case "meeting_user/vote_weight": + case "meeting_user/speaker_ids": return 382 - case "motion/A": + case "meeting_user/structure_level": return 383 - case "motion/C": + case "meeting_user/supported_motion_ids": return 384 - case "motion/D": + case "meeting_user/user_id": return 385 - case "motion/agenda_item_id": + case "meeting_user/vote_delegated_to_id": return 386 - case "motion/all_derived_motion_ids": + case "meeting_user/vote_delegations_from_ids": return 387 - case "motion/all_origin_ids": + case "meeting_user/vote_weight": return 388 - case "motion/amendment_ids": + case "motion/A": return 389 - case "motion/amendment_paragraphs": + case "motion/C": return 390 - case "motion/attachment_ids": + case "motion/D": return 391 - case "motion/block_id": + case "motion/agenda_item_id": return 392 - case "motion/category_id": + case "motion/all_derived_motion_ids": return 393 - case "motion/category_weight": + case "motion/all_origin_ids": return 394 - case "motion/change_recommendation_ids": + case "motion/amendment_ids": return 395 - case "motion/comment_ids": + case "motion/amendment_paragraphs": return 396 - case "motion/created": + case "motion/attachment_ids": return 397 - case "motion/derived_motion_ids": + case "motion/block_id": return 398 - case "motion/forwarded": + case "motion/category_id": return 399 - case "motion/id": + case "motion/category_weight": return 400 - case "motion/last_modified": + case "motion/change_recommendation_ids": return 401 - case "motion/lead_motion_id": + case "motion/comment_ids": return 402 - case "motion/list_of_speakers_id": + case "motion/created": return 403 - case "motion/meeting_id": + case "motion/derived_motion_ids": return 404 - case "motion/modified_final_version": + case "motion/forwarded": return 405 - case "motion/number": + case "motion/id": return 406 - case "motion/number_value": + case "motion/last_modified": return 407 - case "motion/option_ids": + case "motion/lead_motion_id": return 408 - case "motion/origin_id": + case "motion/list_of_speakers_id": return 409 - case "motion/origin_meeting_id": + case "motion/meeting_id": return 410 - case "motion/personal_note_ids": + case "motion/modified_final_version": return 411 - case "motion/poll_ids": + case "motion/number": return 412 - case "motion/projection_ids": + case "motion/number_value": return 413 - case "motion/reason": + case "motion/option_ids": return 414 - case "motion/recommendation_extension": + case "motion/origin_id": return 415 - case "motion/recommendation_extension_reference_ids": + case "motion/origin_meeting_id": return 416 - case "motion/recommendation_id": + case "motion/personal_note_ids": return 417 - case "motion/referenced_in_motion_recommendation_extension_ids": + case "motion/poll_ids": return 418 - case "motion/referenced_in_motion_state_extension_ids": + case "motion/projection_ids": return 419 - case "motion/sequential_number": + case "motion/reason": return 420 - case "motion/sort_child_ids": + case "motion/recommendation_extension": return 421 - case "motion/sort_parent_id": + case "motion/recommendation_extension_reference_ids": return 422 - case "motion/sort_weight": + case "motion/recommendation_id": return 423 - case "motion/start_line_number": + case "motion/referenced_in_motion_recommendation_extension_ids": return 424 - case "motion/state_extension": + case "motion/referenced_in_motion_state_extension_ids": return 425 - case "motion/state_extension_reference_ids": + case "motion/sequential_number": return 426 - case "motion/state_id": + case "motion/sort_child_ids": return 427 - case "motion/statute_paragraph_id": + case "motion/sort_parent_id": return 428 - case "motion/submitter_ids": + case "motion/sort_weight": return 429 - case "motion/supporter_meeting_user_ids": + case "motion/start_line_number": return 430 - case "motion/tag_ids": + case "motion/state_extension": return 431 - case "motion/text": + case "motion/state_extension_reference_ids": return 432 - case "motion/title": + case "motion/state_id": return 433 - case "motion/workflow_timestamp": + case "motion/statute_paragraph_id": return 434 - case "motion_block/A": + case "motion/submitter_ids": return 435 - case "motion_block/agenda_item_id": + case "motion/supporter_meeting_user_ids": return 436 - case "motion_block/id": + case "motion/tag_ids": return 437 - case "motion_block/internal": + case "motion/text": return 438 - case "motion_block/list_of_speakers_id": + case "motion/title": return 439 - case "motion_block/meeting_id": + case "motion/workflow_timestamp": return 440 - case "motion_block/motion_ids": + case "motion_block/A": return 441 - case "motion_block/projection_ids": + case "motion_block/agenda_item_id": return 442 - case "motion_block/sequential_number": + case "motion_block/id": return 443 - case "motion_block/title": + case "motion_block/internal": return 444 - case "motion_category/A": + case "motion_block/list_of_speakers_id": return 445 - case "motion_category/child_ids": + case "motion_block/meeting_id": return 446 - case "motion_category/id": + case "motion_block/motion_ids": return 447 - case "motion_category/level": + case "motion_block/projection_ids": return 448 - case "motion_category/meeting_id": + case "motion_block/sequential_number": return 449 - case "motion_category/motion_ids": + case "motion_block/title": return 450 - case "motion_category/name": + case "motion_category/A": return 451 - case "motion_category/parent_id": + case "motion_category/child_ids": return 452 - case "motion_category/prefix": + case "motion_category/id": return 453 - case "motion_category/sequential_number": + case "motion_category/level": return 454 - case "motion_category/weight": + case "motion_category/meeting_id": return 455 - case "motion_change_recommendation/A": + case "motion_category/motion_ids": return 456 - case "motion_change_recommendation/creation_time": + case "motion_category/name": return 457 + case "motion_category/parent_id": + return 458 + case "motion_category/prefix": + return 459 + case "motion_category/sequential_number": + return 460 + case "motion_category/weight": + return 461 + case "motion_change_recommendation/A": + return 462 + case "motion_change_recommendation/creation_time": + return 463 case "motion_change_recommendation/id": - return 458 + return 464 case "motion_change_recommendation/internal": - return 459 + return 465 case "motion_change_recommendation/line_from": - return 460 + return 466 case "motion_change_recommendation/line_to": - return 461 + return 467 case "motion_change_recommendation/meeting_id": - return 462 + return 468 case "motion_change_recommendation/motion_id": - return 463 + return 469 case "motion_change_recommendation/other_description": - return 464 + return 470 case "motion_change_recommendation/rejected": - return 465 + return 471 case "motion_change_recommendation/text": - return 466 + return 472 case "motion_change_recommendation/type": - return 467 + return 473 case "motion_comment/A": - return 468 + return 474 case "motion_comment/comment": - return 469 + return 475 case "motion_comment/id": - return 470 + return 476 case "motion_comment/meeting_id": - return 471 + return 477 case "motion_comment/motion_id": - return 472 + return 478 case "motion_comment/section_id": - return 473 + return 479 case "motion_comment_section/A": - return 474 + return 480 case "motion_comment_section/comment_ids": - return 475 + return 481 case "motion_comment_section/id": - return 476 + return 482 case "motion_comment_section/meeting_id": - return 477 + return 483 case "motion_comment_section/name": - return 478 + return 484 case "motion_comment_section/read_group_ids": - return 479 + return 485 case "motion_comment_section/sequential_number": - return 480 + return 486 case "motion_comment_section/submitter_can_write": - return 481 + return 487 case "motion_comment_section/weight": - return 482 + return 488 case "motion_comment_section/write_group_ids": - return 483 + return 489 case "motion_state/A": - return 484 + return 490 case "motion_state/allow_create_poll": - return 485 + return 491 case "motion_state/allow_motion_forwarding": - return 486 + return 492 case "motion_state/allow_submitter_edit": - return 487 + return 493 case "motion_state/allow_support": - return 488 + return 494 case "motion_state/css_class": - return 489 + return 495 case "motion_state/first_state_of_workflow_id": - return 490 + return 496 case "motion_state/id": - return 491 + return 497 case "motion_state/meeting_id": - return 492 + return 498 case "motion_state/merge_amendment_into_final": - return 493 + return 499 case "motion_state/motion_ids": - return 494 + return 500 case "motion_state/motion_recommendation_ids": - return 495 + return 501 case "motion_state/name": - return 496 + return 502 case "motion_state/next_state_ids": - return 497 + return 503 case "motion_state/previous_state_ids": - return 498 + return 504 case "motion_state/recommendation_label": - return 499 + return 505 case "motion_state/restrictions": - return 500 + return 506 case "motion_state/set_number": - return 501 + return 507 case "motion_state/set_workflow_timestamp": - return 502 + return 508 case "motion_state/show_recommendation_extension_field": - return 503 + return 509 case "motion_state/show_state_extension_field": - return 504 + return 510 case "motion_state/submitter_withdraw_back_ids": - return 505 + return 511 case "motion_state/submitter_withdraw_state_id": - return 506 + return 512 case "motion_state/weight": - return 507 + return 513 case "motion_state/workflow_id": - return 508 + return 514 case "motion_statute_paragraph/A": - return 509 + return 515 case "motion_statute_paragraph/id": - return 510 + return 516 case "motion_statute_paragraph/meeting_id": - return 511 + return 517 case "motion_statute_paragraph/motion_ids": - return 512 + return 518 case "motion_statute_paragraph/sequential_number": - return 513 + return 519 case "motion_statute_paragraph/text": - return 514 + return 520 case "motion_statute_paragraph/title": - return 515 + return 521 case "motion_statute_paragraph/weight": - return 516 + return 522 case "motion_submitter/A": - return 517 + return 523 case "motion_submitter/id": - return 518 + return 524 case "motion_submitter/meeting_id": - return 519 + return 525 case "motion_submitter/meeting_user_id": - return 520 + return 526 case "motion_submitter/motion_id": - return 521 + return 527 case "motion_submitter/weight": - return 522 + return 528 case "motion_workflow/A": - return 523 + return 529 case "motion_workflow/default_amendment_workflow_meeting_id": - return 524 + return 530 case "motion_workflow/default_statute_amendment_workflow_meeting_id": - return 525 + return 531 case "motion_workflow/default_workflow_meeting_id": - return 526 + return 532 case "motion_workflow/first_state_id": - return 527 + return 533 case "motion_workflow/id": - return 528 + return 534 case "motion_workflow/meeting_id": - return 529 + return 535 case "motion_workflow/name": - return 530 + return 536 case "motion_workflow/sequential_number": - return 531 + return 537 case "motion_workflow/state_ids": - return 532 + return 538 case "option/A": - return 533 + return 539 case "option/B": - return 534 + return 540 case "option/abstain": - return 535 + return 541 case "option/content_object_id": - return 536 + return 542 case "option/id": - return 537 + return 543 case "option/meeting_id": - return 538 + return 544 case "option/no": - return 539 + return 545 case "option/poll_id": - return 540 + return 546 case "option/text": - return 541 + return 547 case "option/used_as_global_option_in_poll_id": - return 542 + return 548 case "option/vote_ids": - return 543 + return 549 case "option/weight": - return 544 + return 550 case "option/yes": - return 545 + return 551 case "organization/A": - return 546 + return 552 case "organization/B": - return 547 + return 553 case "organization/C": - return 548 + return 554 case "organization/active_meeting_ids": - return 549 + return 555 case "organization/archived_meeting_ids": - return 550 + return 556 case "organization/committee_ids": - return 551 + return 557 case "organization/default_language": - return 552 + return 558 case "organization/description": - return 553 + return 559 case "organization/enable_chat": - return 554 + return 560 case "organization/enable_electronic_voting": - return 555 + return 561 case "organization/genders": - return 556 + return 562 case "organization/id": - return 557 + return 563 case "organization/legal_notice": - return 558 + return 564 case "organization/limit_of_meetings": - return 559 + return 565 case "organization/limit_of_users": - return 560 + return 566 case "organization/login_text": - return 561 + return 567 case "organization/mediafile_ids": - return 562 + return 568 case "organization/name": - return 563 + return 569 case "organization/organization_tag_ids": - return 564 + return 570 case "organization/privacy_policy": - return 565 + return 571 case "organization/reset_password_verbose_errors": - return 566 + return 572 case "organization/saml_attr_mapping": - return 567 + return 573 case "organization/saml_enabled": - return 568 + return 574 case "organization/saml_login_button_text": - return 569 + return 575 case "organization/saml_metadata_idp": - return 570 + return 576 case "organization/saml_metadata_sp": - return 571 + return 577 case "organization/saml_private_key": - return 572 + return 578 case "organization/template_meeting_ids": - return 573 + return 579 case "organization/theme_id": - return 574 + return 580 case "organization/theme_ids": - return 575 + return 581 case "organization/url": - return 576 + return 582 case "organization/user_ids": - return 577 + return 583 case "organization/users_email_body": - return 578 + return 584 case "organization/users_email_replyto": - return 579 + return 585 case "organization/users_email_sender": - return 580 + return 586 case "organization/users_email_subject": - return 581 + return 587 case "organization/vote_decrypt_public_main_key": - return 582 + return 588 case "organization_tag/A": - return 583 + return 589 case "organization_tag/color": - return 584 + return 590 case "organization_tag/id": - return 585 + return 591 case "organization_tag/name": - return 586 + return 592 case "organization_tag/organization_id": - return 587 + return 593 case "organization_tag/tagged_ids": - return 588 + return 594 case "personal_note/A": - return 589 + return 595 case "personal_note/content_object_id": - return 590 + return 596 case "personal_note/id": - return 591 + return 597 case "personal_note/meeting_id": - return 592 + return 598 case "personal_note/meeting_user_id": - return 593 + return 599 case "personal_note/note": - return 594 + return 600 case "personal_note/star": - return 595 + return 601 case "point_of_order_category/A": - return 596 + return 602 case "point_of_order_category/id": - return 597 + return 603 case "point_of_order_category/meeting_id": - return 598 + return 604 case "point_of_order_category/rank": - return 599 + return 605 case "point_of_order_category/speaker_ids": - return 600 + return 606 case "point_of_order_category/text": - return 601 + return 607 case "poll/A": - return 602 + return 608 case "poll/B": - return 603 + return 609 case "poll/C": - return 604 + return 610 case "poll/D": - return 605 + return 611 case "poll/backend": - return 606 + return 612 case "poll/content_object_id": - return 607 + return 613 case "poll/crypt_key": - return 608 + return 614 case "poll/crypt_signature": - return 609 + return 615 case "poll/description": - return 610 + return 616 case "poll/entitled_group_ids": - return 611 + return 617 case "poll/entitled_users_at_stop": - return 612 + return 618 case "poll/global_abstain": - return 613 + return 619 case "poll/global_no": - return 614 + return 620 case "poll/global_option_id": - return 615 + return 621 case "poll/global_yes": - return 616 + return 622 case "poll/id": - return 617 + return 623 case "poll/is_pseudoanonymized": - return 618 + return 624 case "poll/max_votes_amount": - return 619 + return 625 case "poll/max_votes_per_option": - return 620 + return 626 case "poll/meeting_id": - return 621 + return 627 case "poll/min_votes_amount": - return 622 + return 628 case "poll/onehundred_percent_base": - return 623 + return 629 case "poll/option_ids": - return 624 + return 630 case "poll/pollmethod": - return 625 + return 631 case "poll/projection_ids": - return 626 + return 632 case "poll/sequential_number": - return 627 + return 633 case "poll/state": - return 628 + return 634 case "poll/title": - return 629 + return 635 case "poll/type": - return 630 + return 636 case "poll/vote_count": - return 631 + return 637 case "poll/voted_ids": - return 632 + return 638 case "poll/votes_raw": - return 633 + return 639 case "poll/votes_signature": - return 634 + return 640 case "poll/votescast": - return 635 + return 641 case "poll/votesinvalid": - return 636 + return 642 case "poll/votesvalid": - return 637 + return 643 case "poll_candidate/A": - return 638 + return 644 case "poll_candidate/id": - return 639 + return 645 case "poll_candidate/meeting_id": - return 640 + return 646 case "poll_candidate/poll_candidate_list_id": - return 641 + return 647 case "poll_candidate/user_id": - return 642 + return 648 case "poll_candidate/weight": - return 643 + return 649 case "poll_candidate_list/A": - return 644 + return 650 case "poll_candidate_list/id": - return 645 + return 651 case "poll_candidate_list/meeting_id": - return 646 + return 652 case "poll_candidate_list/option_id": - return 647 + return 653 case "poll_candidate_list/poll_candidate_ids": - return 648 + return 654 case "projection/A": - return 649 + return 655 case "projection/content": - return 650 + return 656 case "projection/content_object_id": - return 651 + return 657 case "projection/current_projector_id": - return 652 + return 658 case "projection/history_projector_id": - return 653 + return 659 case "projection/id": - return 654 + return 660 case "projection/meeting_id": - return 655 + return 661 case "projection/options": - return 656 + return 662 case "projection/preview_projector_id": - return 657 + return 663 case "projection/stable": - return 658 + return 664 case "projection/type": - return 659 + return 665 case "projection/weight": - return 660 + return 666 case "projector/A": - return 661 + return 667 case "projector/aspect_ratio_denominator": - return 662 + return 668 case "projector/aspect_ratio_numerator": - return 663 + return 669 case "projector/background_color": - return 664 + return 670 case "projector/chyron_background_color": - return 665 + return 671 case "projector/chyron_font_color": - return 666 + return 672 case "projector/color": - return 667 + return 673 case "projector/current_projection_ids": - return 668 + return 674 case "projector/header_background_color": - return 669 + return 675 case "projector/header_font_color": - return 670 + return 676 case "projector/header_h1_color": - return 671 + return 677 case "projector/history_projection_ids": - return 672 + return 678 case "projector/id": - return 673 + return 679 case "projector/is_internal": - return 674 + return 680 case "projector/meeting_id": - return 675 + return 681 case "projector/name": - return 676 + return 682 case "projector/preview_projection_ids": - return 677 + return 683 case "projector/scale": - return 678 + return 684 case "projector/scroll": - return 679 + return 685 case "projector/sequential_number": - return 680 + return 686 case "projector/show_clock": - return 681 + return 687 case "projector/show_header_footer": - return 682 + return 688 case "projector/show_logo": - return 683 + return 689 case "projector/show_title": - return 684 + return 690 case "projector/used_as_default_projector_for_agenda_item_list_in_meeting_id": - return 685 + return 691 case "projector/used_as_default_projector_for_amendment_in_meeting_id": - return 686 + return 692 case "projector/used_as_default_projector_for_assignment_in_meeting_id": - return 687 + return 693 case "projector/used_as_default_projector_for_assignment_poll_in_meeting_id": - return 688 + return 694 case "projector/used_as_default_projector_for_countdown_in_meeting_id": - return 689 + return 695 case "projector/used_as_default_projector_for_current_list_of_speakers_in_meeting_id": - return 690 + return 696 case "projector/used_as_default_projector_for_list_of_speakers_in_meeting_id": - return 691 + return 697 case "projector/used_as_default_projector_for_mediafile_in_meeting_id": - return 692 + return 698 case "projector/used_as_default_projector_for_message_in_meeting_id": - return 693 + return 699 case "projector/used_as_default_projector_for_motion_block_in_meeting_id": - return 694 + return 700 case "projector/used_as_default_projector_for_motion_in_meeting_id": - return 695 + return 701 case "projector/used_as_default_projector_for_motion_poll_in_meeting_id": - return 696 + return 702 case "projector/used_as_default_projector_for_poll_in_meeting_id": - return 697 + return 703 case "projector/used_as_default_projector_for_topic_in_meeting_id": - return 698 + return 704 case "projector/used_as_reference_projector_meeting_id": - return 699 + return 705 case "projector/width": - return 700 + return 706 case "projector_countdown/A": - return 701 + return 707 case "projector_countdown/countdown_time": - return 702 + return 708 case "projector_countdown/default_time": - return 703 + return 709 case "projector_countdown/description": - return 704 + return 710 case "projector_countdown/id": - return 705 + return 711 case "projector_countdown/meeting_id": - return 706 + return 712 case "projector_countdown/projection_ids": - return 707 + return 713 case "projector_countdown/running": - return 708 + return 714 case "projector_countdown/title": - return 709 + return 715 case "projector_countdown/used_as_list_of_speakers_countdown_meeting_id": - return 710 + return 716 case "projector_countdown/used_as_poll_countdown_meeting_id": - return 711 + return 717 case "projector_message/A": - return 712 + return 718 case "projector_message/id": - return 713 + return 719 case "projector_message/meeting_id": - return 714 + return 720 case "projector_message/message": - return 715 + return 721 case "projector_message/projection_ids": - return 716 + return 722 case "speaker/A": - return 717 + return 723 case "speaker/begin_time": - return 718 + return 724 case "speaker/end_time": - return 719 + return 725 case "speaker/id": - return 720 + return 726 case "speaker/list_of_speakers_id": - return 721 + return 727 case "speaker/meeting_id": - return 722 + return 728 case "speaker/meeting_user_id": - return 723 + return 729 case "speaker/note": - return 724 + return 730 case "speaker/point_of_order": - return 725 + return 731 case "speaker/point_of_order_category_id": - return 726 + return 732 case "speaker/speech_state": - return 727 + return 733 case "speaker/weight": - return 728 + return 734 case "tag/A": - return 729 + return 735 case "tag/id": - return 730 + return 736 case "tag/meeting_id": - return 731 + return 737 case "tag/name": - return 732 + return 738 case "tag/tagged_ids": - return 733 + return 739 case "theme/A": - return 734 + return 740 case "theme/abstain": - return 735 + return 741 case "theme/accent_100": - return 736 + return 742 case "theme/accent_200": - return 737 + return 743 case "theme/accent_300": - return 738 + return 744 case "theme/accent_400": - return 739 + return 745 case "theme/accent_50": - return 740 + return 746 case "theme/accent_500": - return 741 + return 747 case "theme/accent_600": - return 742 + return 748 case "theme/accent_700": - return 743 + return 749 case "theme/accent_800": - return 744 + return 750 case "theme/accent_900": - return 745 + return 751 case "theme/accent_a100": - return 746 + return 752 case "theme/accent_a200": - return 747 + return 753 case "theme/accent_a400": - return 748 + return 754 case "theme/accent_a700": - return 749 + return 755 case "theme/headbar": - return 750 + return 756 case "theme/id": - return 751 + return 757 case "theme/name": - return 752 + return 758 case "theme/no": - return 753 + return 759 case "theme/organization_id": - return 754 + return 760 case "theme/primary_100": - return 755 + return 761 case "theme/primary_200": - return 756 + return 762 case "theme/primary_300": - return 757 + return 763 case "theme/primary_400": - return 758 + return 764 case "theme/primary_50": - return 759 + return 765 case "theme/primary_500": - return 760 + return 766 case "theme/primary_600": - return 761 + return 767 case "theme/primary_700": - return 762 + return 768 case "theme/primary_800": - return 763 + return 769 case "theme/primary_900": - return 764 + return 770 case "theme/primary_a100": - return 765 + return 771 case "theme/primary_a200": - return 766 + return 772 case "theme/primary_a400": - return 767 + return 773 case "theme/primary_a700": - return 768 + return 774 case "theme/theme_for_organization_id": - return 769 + return 775 case "theme/warn_100": - return 770 + return 776 case "theme/warn_200": - return 771 + return 777 case "theme/warn_300": - return 772 + return 778 case "theme/warn_400": - return 773 + return 779 case "theme/warn_50": - return 774 + return 780 case "theme/warn_500": - return 775 + return 781 case "theme/warn_600": - return 776 + return 782 case "theme/warn_700": - return 777 + return 783 case "theme/warn_800": - return 778 + return 784 case "theme/warn_900": - return 779 + return 785 case "theme/warn_a100": - return 780 + return 786 case "theme/warn_a200": - return 781 + return 787 case "theme/warn_a400": - return 782 + return 788 case "theme/warn_a700": - return 783 + return 789 case "theme/yes": - return 784 + return 790 case "topic/A": - return 785 + return 791 case "topic/agenda_item_id": - return 786 + return 792 case "topic/attachment_ids": - return 787 + return 793 case "topic/id": - return 788 + return 794 case "topic/list_of_speakers_id": - return 789 + return 795 case "topic/meeting_id": - return 790 + return 796 case "topic/poll_ids": - return 791 + return 797 case "topic/projection_ids": - return 792 + return 798 case "topic/sequential_number": - return 793 + return 799 case "topic/text": - return 794 + return 800 case "topic/title": - return 795 + return 801 case "user/A": - return 796 + return 802 case "user/D": - return 797 + return 803 case "user/E": - return 798 + return 804 case "user/F": - return 799 + return 805 case "user/G": - return 800 + return 806 case "user/H": - return 801 + return 807 case "user/can_change_own_password": - return 802 + return 808 case "user/committee_ids": - return 803 + return 809 case "user/committee_management_ids": - return 804 + return 810 case "user/default_number": - return 805 + return 811 case "user/default_password": - return 806 + return 812 case "user/default_structure_level": - return 807 + return 813 case "user/default_vote_weight": - return 808 + return 814 case "user/delegated_vote_ids": - return 809 + return 815 case "user/email": - return 810 + return 816 case "user/first_name": - return 811 + return 817 case "user/forwarding_committee_ids": - return 812 + return 818 case "user/gender": - return 813 + return 819 case "user/id": - return 814 + return 820 case "user/is_active": - return 815 + return 821 case "user/is_demo_user": - return 816 + return 822 case "user/is_physical_person": - return 817 + return 823 case "user/is_present_in_meeting_ids": - return 818 + return 824 case "user/last_email_sent": - return 819 + return 825 case "user/last_login": - return 820 + return 826 case "user/last_name": - return 821 + return 827 case "user/meeting_ids": - return 822 + return 828 case "user/meeting_user_ids": - return 823 + return 829 case "user/option_ids": - return 824 + return 830 case "user/organization_id": - return 825 + return 831 case "user/organization_management_level": - return 826 + return 832 case "user/password": - return 827 + return 833 case "user/poll_candidate_ids": - return 828 + return 834 case "user/poll_voted_ids": - return 829 + return 835 case "user/pronoun": - return 830 + return 836 case "user/saml_id": - return 831 + return 837 case "user/title": - return 832 + return 838 case "user/username": - return 833 + return 839 case "user/vote_ids": - return 834 + return 840 case "vote/A": - return 835 + return 841 case "vote/B": - return 836 + return 842 case "vote/delegated_user_id": - return 837 + return 843 case "vote/id": - return 838 + return 844 case "vote/meeting_id": - return 839 + return 845 case "vote/option_id": - return 840 + return 846 case "vote/user_id": - return 841 + return 847 case "vote/user_token": - return 842 + return 848 case "vote/value": - return 843 + return 849 case "vote/weight": - return 844 + return 850 default: return -1 } From 2af4fd2a46ccb370859d2307eb1e84db41103b99 Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Tue, 3 Oct 2023 15:40:29 +0200 Subject: [PATCH 2/2] restriction for import_preview --- .../restrict/collection/import_preview.go | 11 ++----- .../collection/import_preview_test.go | 29 +++++++++++++++++++ 2 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 internal/restrict/collection/import_preview_test.go diff --git a/internal/restrict/collection/import_preview.go b/internal/restrict/collection/import_preview.go index 4b7230f2..78023c70 100644 --- a/internal/restrict/collection/import_preview.go +++ b/internal/restrict/collection/import_preview.go @@ -2,16 +2,13 @@ package collection import ( "context" - "errors" "github.com/OpenSlides/openslides-autoupdate-service/pkg/datastore/dsfetch" ) // ImportPreview handels restrictions of the collection import_preview. // -// The user can see a import_preview, if TODO -// -// Mode A: The user can see the import_preview. +// Noone can see the import_preview type ImportPreview struct{} // Name returns the collection name. @@ -28,11 +25,7 @@ func (i ImportPreview) MeetingID(ctx context.Context, ds *dsfetch.Fetch, id int) func (i ImportPreview) Modes(mode string) FieldRestricter { switch mode { case "A": - return i.see + return never } return nil } - -func (i ImportPreview) see(ctx context.Context, ds *dsfetch.Fetch, importPreviewIDs ...int) ([]int, error) { - return nil, errors.New("TODO") -} diff --git a/internal/restrict/collection/import_preview_test.go b/internal/restrict/collection/import_preview_test.go new file mode 100644 index 00000000..5d94361b --- /dev/null +++ b/internal/restrict/collection/import_preview_test.go @@ -0,0 +1,29 @@ +package collection_test + +import ( + "testing" + + "github.com/OpenSlides/openslides-autoupdate-service/internal/restrict/collection" +) + +func TestImportPreviewModeA(t *testing.T) { + var i collection.ImportPreview + + testCase( + "no perms", + t, + i.Modes("A"), + false, + ``, + ) + + testCase( + "organization manager", + t, + i.Modes("A"), + false, + `--- + user/1/organization_management_level: can_manage_organization + `, + ) +}