forked from OpenSlides/openslides-meta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.yml
4274 lines (4149 loc) · 98.4 KB
/
models.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
# Types:
# - Nativ datatypes: text, string (text with maxLength=256), number, boolean, JSON
# - HTMLStrict: A string with HTML content.
# - HTMLPermissive: A string with HTML content (with video tags).
# - float: Numbers that are expected to be non-integer. Formatted as in rfc7159.
# - decimal(X): Decimal values represented as a string with X decimal places.
# At the moment we support only X == 6.
# - timestamp: Datetime as a unix timestamp. Why a number? This enables queries
# in the DB. And we do not need more precision than 1 second.
# - <T>[]: This indicates and arbitrary array of the given type. At the moment
# we support only some types. You can add JSON Schema properties for items
# using the extra property `items`
# - color: string that must match ^#[0-9a-f]{6}$
# Relations:
# - We have the following types: `relation`, `relation-list`, `generic-relation`
# and `generic-relation-list`.
# - Non-generic relations: The simple syntax for such a field
# `to: <collection>/<field>`. This is a reference to a collection. The reverse
# relation field in this collection is <field>. E. g. in a motion the field
# `category_id` links to one category where the field `motion_ids` contains the
# motion id. The simple notation for the field is `motion_category/motion_ids`.
# The reverse field has type `relation-list` and is related back to
# `motion/category_id`. The type indicates that there are many
# motion ids.
# - Generic relations: The difference to non-generic relations is that you have a
# list of possible fields, so `to` can either hold multiple collections (if the
# field name is the same):
# to:
# collections:
# - agenda_item
# - assignment
# - ...
# field: tag_ids
# Or `to` can be a list of collection fields:
# to:
# - motion/option_ids
# - user/option_$_ids
# - on_delete: This fields determines what should happen with the foreign model if
# this model gets deleted. Possible values are:
# - SET_NULL (default): delete the id from the foreign key
# - PROTECT: if the foreign key is not empty, throw an error instead of
# deleting the object
# - CASCADE: also delete all models in this foreign key
# JSON Schema Properties:
# - You can add JSON Schema properties to the fields like `enum`, `description`,
# `items`, `maxLength` and `minimum`
# Additional properties:
# - The property `read_only` describes a field that can not be changed by an action.
# - The property `default` describes the default value that is used for new objects.
# - The property `required` describes that this field can not be null or an empty
# string. If this field is given it must have some content. On relation and generic-relation
# fields the value as to be an id of an existing object.
# - The property `equal_fields` describes fields that must have the same value in
# the instance and the related instance.
# Restriction Mode:
# The field `restriction_mode` is required for every field. It puts the field into a
# restriction group. See https://github.com/OpenSlides/OpenSlides/wiki/Restrictions-Overview
_meta: # meta field to hold repeatedly used values
languages: &languages
- en
- de
- it
- es
- ru
- cs
- fr
ballot_paper_selection: &ballot_paper_selection
- NUMBER_OF_DELEGATES
- NUMBER_OF_ALL_PARTICIPANTS
- CUSTOM_NUMBER
poll_backends: &poll_backends
- long
- fast
onehundred_percent_bases: &onehundred_percent_bases
- "Y"
- "YN"
- "YNA"
- "N"
- "valid"
- "cast"
- "entitled"
- "entitled_present"
- "disabled"
organization:
id:
type: number
restriction_mode: A
constant: true
name:
type: string
restriction_mode: A
description:
type: HTMLStrict
restriction_mode: A
# Settings (configurable by the client)
legal_notice:
type: text
restriction_mode: A
privacy_policy:
type: text
restriction_mode: A
login_text:
type: text
restriction_mode: A
reset_password_verbose_errors:
type: boolean
restriction_mode: B
genders:
type: string[]
default:
- male
- female
- diverse
- non-binary
restriction_mode: A
# Configuration (only for the server owner)
enable_electronic_voting:
type: boolean
restriction_mode: B
enable_chat:
type: boolean
restriction_mode: B
limit_of_meetings:
type: number
description: Maximum of active meetings for the whole organization. 0 means no limitation at all
restriction_mode: B
default: 0
minimum: 0
limit_of_users:
type: number
description: Maximum of active users for the whole organization. 0 means no limitation at all
restriction_mode: B
default: 0
minimum: 0
default_language:
type: string
restriction_mode: A
enum: *languages
required: true
require_duplicate_from:
type: boolean
restriction_mode: A
# Saml settings
saml_enabled:
type: boolean
restriction_mode: A
saml_login_button_text:
type: string
default: SAML login
restriction_mode: A
saml_attr_mapping:
type: JSON
restriction_mode: A
saml_metadata_idp:
type: text
restriction_mode: A
saml_metadata_sp:
type: text
restriction_mode: A
saml_private_key:
type: text
restriction_mode: A
vote_decrypt_public_main_key:
type: string
description: Public key from vote decrypt to validate cryptographic votes.
calculated: true
restriction_mode: A
committee_ids:
type: relation-list
restriction_mode: B
to: committee/organization_id
active_meeting_ids:
type: relation-list
restriction_mode: A
to: meeting/is_active_in_organization_id
archived_meeting_ids:
type: relation-list
restriction_mode: B
to: meeting/is_archived_in_organization_id
template_meeting_ids:
type: relation-list
to: meeting/template_for_organization_id
restriction_mode: A
organization_tag_ids:
type: relation-list
restriction_mode: B
to: organization_tag/organization_id
theme_id:
type: relation
required: true
restriction_mode: A
to: theme/theme_for_organization_id
theme_ids:
type: relation-list
restriction_mode: A
to: theme/organization_id
mediafile_ids:
type: relation-list
to: mediafile/owner_id
on_delete: CASCADE
restriction_mode: A
user_ids:
type: relation-list
restriction_mode: C
to: user/organization_id
users_email_sender:
type: string
default: OpenSlides
restriction_mode: A
users_email_replyto:
type: string
restriction_mode: A
users_email_subject:
type: string
default: OpenSlides access data
restriction_mode: A
users_email_body:
type: text
default: >-
Dear {name},
this is your personal OpenSlides login:
{url}
Username: {username}
Password: {password}
This email was generated automatically.
restriction_mode: A
url:
type: string
default: https://example.com
restriction_mode: A
user:
id:
type: number
restriction_mode: A
constant: true
username:
type: string
required: true
restriction_mode: B
member_number:
type: string
restriction_mode: B
saml_id:
type: string
minLength: 1
restriction_mode: B
description: unique-key from IdP for SAML login
pronoun:
type: string
maxLength: 32
restriction_mode: A
title:
type: string
restriction_mode: A
first_name:
type: string
restriction_mode: A
last_name:
type: string
restriction_mode: A
is_active:
type: boolean
restriction_mode: B
is_physical_person:
type: boolean
default: true
restriction_mode: A
password:
type: string
restriction_mode: G
default_password:
type: string
restriction_mode: H
can_change_own_password:
type: boolean
default: true
restriction_mode: D
gender:
type: string
restriction_mode: A
email:
type: string
restriction_mode: B
default_vote_weight:
type: decimal(6)
default: "1.000000"
minimum: "0.000001"
restriction_mode: A
last_email_sent:
type: timestamp
restriction_mode: B
is_demo_user:
type: boolean
restriction_mode: A
last_login:
type: timestamp
restriction_mode: A
read_only: true
# Organization, meeting and committee
organization_management_level:
type: string
description: Hierarchical permission level for the whole organization.
enum:
- superadmin
- can_manage_organization
- can_manage_users
restriction_mode: B
is_present_in_meeting_ids:
type: relation-list
to: meeting/present_user_ids
restriction_mode: A
# Calculates all committee's where the user is
# - committee-manager (= committees in committee_management_ids)
# - is member (= has group-rights) of a meeting in the committee
committee_ids:
type: relation-list
to: committee/user_ids
restriction_mode: E
read_only: true
description: "Calculated field."
# committee specific permissions
committee_management_ids:
type: relation-list
to: committee/manager_ids
restriction_mode: E
# for the motion forwarding
forwarding_committee_ids:
type: relation-list
to: committee/forwarding_user_id
restriction_mode: E
meeting_user_ids:
type: relation-list
to: meeting_user/user_id
restriction_mode: A
on_delete: CASCADE
poll_voted_ids:
type: relation-list
to: poll/voted_ids
restriction_mode: A
option_ids:
type: relation-list
to: option/content_object_id
restriction_mode: A
vote_ids:
type: relation-list
to: vote/user_id
restriction_mode: A
delegated_vote_ids:
type: relation-list
to: vote/delegated_user_id
restriction_mode: A
poll_candidate_ids:
type: relation-list
to: poll_candidate/user_id
restriction_mode: A
meeting_ids:
type: number[]
description: Calculated. All ids from meetings calculated via meeting_user and group_ids as integers.
read_only: true
restriction_mode: E
organization_id:
type: relation
to: organization/user_ids
required: True
restriction_mode: F
constant: true
meeting_user:
id:
type: number
required: true
restriction_mode: A
constant: true
comment:
type: HTMLStrict
restriction_mode: D
number:
type: string
restriction_mode: A
about_me:
type: HTMLStrict
restriction_mode: A
vote_weight:
type: decimal(6)
minimum: "0.000001"
restriction_mode: A
locked_out:
type: boolean
restriction_mode: E
user_id:
type: relation
to: user/meeting_user_ids
required: true
restriction_mode: A
constant: true
meeting_id:
type: relation
to: meeting/meeting_user_ids
required: true
restriction_mode: A
constant: true
personal_note_ids:
type: relation-list
to: personal_note/meeting_user_id
equal_fields: meeting_id
on_delete: CASCADE
restriction_mode: B
speaker_ids:
type: relation-list
to: speaker/meeting_user_id
equal_fields: meeting_id
restriction_mode: A
supported_motion_ids:
type: relation-list
to: motion/supporter_meeting_user_ids
equal_fields: meeting_id
restriction_mode: A
motion_editor_ids:
type: relation-list
to: motion_editor/meeting_user_id
equal_fields: meeting_id
restriction_mode: A
motion_working_group_speaker_ids:
type: relation-list
to: motion_working_group_speaker/meeting_user_id
equal_fields: meeting_id
restriction_mode: A
motion_submitter_ids:
type: relation-list
to: motion_submitter/meeting_user_id
equal_fields: meeting_id
on_delete: CASCADE
restriction_mode: A
assignment_candidate_ids:
type: relation-list
to: assignment_candidate/meeting_user_id
equal_fields: meeting_id
restriction_mode: A
vote_delegated_to_id:
type: relation
to: meeting_user/vote_delegations_from_ids
equal_fields: meeting_id
restriction_mode: A
vote_delegations_from_ids:
type: relation-list
to: meeting_user/vote_delegated_to_id
equal_fields: meeting_id
restriction_mode: A
chat_message_ids:
type: relation-list
to: chat_message/meeting_user_id
equal_fields: meeting_id
restriction_mode: A
group_ids:
type: relation-list
to: group/meeting_user_ids
equal_fields: meeting_id
restriction_mode: A
structure_level_ids:
type: relation-list
equal_fields: meeting_id
restriction_mode: A
to: structure_level/meeting_user_ids
organization_tag:
id:
type: number
restriction_mode: A
constant: true
name:
type: string
required: True
restriction_mode: A
color:
type: color
required: True
restriction_mode: A
tagged_ids:
type: generic-relation-list
to:
collections:
- committee
- meeting
field: organization_tag_ids
restriction_mode: A
organization_id:
type: relation
to: organization/organization_tag_ids
restriction_mode: A
required: true
theme:
id:
restriction_mode: A
type: number
required: true
constant: true
name:
restriction_mode: A
type: string
required: true
accent_100:
restriction_mode: A
type: color
accent_200:
restriction_mode: A
type: color
accent_300:
restriction_mode: A
type: color
accent_400:
restriction_mode: A
type: color
accent_50:
restriction_mode: A
type: color
accent_500:
restriction_mode: A
type: color
required: true
accent_600:
restriction_mode: A
type: color
accent_700:
restriction_mode: A
type: color
accent_800:
restriction_mode: A
type: color
accent_900:
restriction_mode: A
type: color
accent_a100:
restriction_mode: A
type: color
accent_a200:
restriction_mode: A
type: color
accent_a400:
restriction_mode: A
type: color
accent_a700:
restriction_mode: A
type: color
primary_100:
restriction_mode: A
type: color
primary_200:
restriction_mode: A
type: color
primary_300:
restriction_mode: A
type: color
primary_400:
restriction_mode: A
type: color
primary_50:
restriction_mode: A
type: color
primary_500:
restriction_mode: A
type: color
required: true
primary_600:
restriction_mode: A
type: color
primary_700:
restriction_mode: A
type: color
primary_800:
restriction_mode: A
type: color
primary_900:
restriction_mode: A
type: color
primary_a100:
restriction_mode: A
type: color
primary_a200:
restriction_mode: A
type: color
primary_a400:
restriction_mode: A
type: color
primary_a700:
restriction_mode: A
type: color
warn_100:
restriction_mode: A
type: color
warn_200:
restriction_mode: A
type: color
warn_300:
restriction_mode: A
type: color
warn_400:
restriction_mode: A
type: color
warn_50:
restriction_mode: A
type: color
warn_500:
restriction_mode: A
type: color
required: true
warn_600:
restriction_mode: A
type: color
warn_700:
restriction_mode: A
type: color
warn_800:
restriction_mode: A
type: color
warn_900:
restriction_mode: A
type: color
warn_a100:
restriction_mode: A
type: color
warn_a200:
restriction_mode: A
type: color
warn_a400:
restriction_mode: A
type: color
warn_a700:
restriction_mode: A
type: color
headbar:
restriction_mode: A
type: color
"yes":
restriction_mode: A
type: color
"no":
restriction_mode: A
type: color
abstain:
restriction_mode: A
type: color
theme_for_organization_id:
restriction_mode: A
to: organization/theme_id
type: relation
organization_id:
required: true
restriction_mode: A
to: organization/theme_ids
type: relation
constant: true
committee:
id:
type: number
restriction_mode: A
constant: true
name:
type: string
required: true
restriction_mode: A
description:
type: HTMLStrict
restriction_mode: A
external_id:
type: string
restriction_mode: A
description: unique
meeting_ids:
type: relation-list
to: meeting/committee_id
on_delete: PROTECT
restriction_mode: A
default_meeting_id:
type: relation
to: meeting/default_meeting_for_committee_id
restriction_mode: A
user_ids:
type: relation-list
to: user/committee_ids
restriction_mode: A
read_only: true
description: "Calculated field."
manager_ids:
type: relation-list
to: user/committee_management_ids
restriction_mode: B
forward_to_committee_ids:
type: relation-list
to: committee/receive_forwardings_from_committee_ids
restriction_mode: B
receive_forwardings_from_committee_ids:
type: relation-list
to: committee/forward_to_committee_ids
restriction_mode: B
forwarding_user_id:
type: relation
to: user/forwarding_committee_ids
restriction_mode: B
organization_tag_ids:
type: relation-list
to: organization_tag/tagged_ids
restriction_mode: A
organization_id:
type: relation
to: organization/committee_ids
required: true
restriction_mode: A
constant: true
meeting:
id:
type: number
restriction_mode: A
constant: true
external_id:
type: string
restriction_mode: A
description: unique in committee
welcome_title:
type: string
default: Welcome to OpenSlides
restriction_mode: C
welcome_text:
type: HTMLPermissive
default: Space for your welcome text.
restriction_mode: C
# General
name:
type: string
maxLength: 100
default: OpenSlides
restriction_mode: A
required: true
is_active_in_organization_id:
type: relation
to: organization/active_meeting_ids
restriction_mode: A
description: Backrelation and boolean flag at once
is_archived_in_organization_id:
type: relation
to: organization/archived_meeting_ids
restriction_mode: A
description: Backrelation and boolean flag at once
description:
type: string
maxLength: 100
default: Presentation and assembly system
restriction_mode: B
location:
type: string
restriction_mode: B
start_time:
type: timestamp
restriction_mode: B
end_time:
type: timestamp
restriction_mode: B
locked_from_inside:
type: boolean
restriction_mode: B
imported_at:
type: timestamp
restriction_mode: B
language:
type: string
restriction_mode: A
enum: *languages
required: true
constant: true
# Configuration (only for the server owner)
jitsi_domain:
type: string
restriction_mode: B
jitsi_room_name:
type: string
restriction_mode: B
jitsi_room_password:
type: string
restriction_mode: B
# System
template_for_organization_id:
type: relation
to: organization/template_meeting_ids
restriction_mode: B
enable_anonymous:
type: boolean
default: False
restriction_mode: A
custom_translations:
type: JSON
restriction_mode: B
# Jitsi/Livestream settings
conference_show:
type: boolean
default: False
restriction_mode: C
conference_auto_connect:
type: boolean
default: False
restriction_mode: C
conference_los_restriction:
type: boolean
default: True
restriction_mode: C
conference_stream_url:
type: string
restriction_mode: C
conference_stream_poster_url:
type: string
restriction_mode: C
conference_open_microphone:
type: boolean
default: False
restriction_mode: C
conference_open_video:
type: boolean
default: False
restriction_mode: C
conference_auto_connect_next_speakers:
type: number
default: 0
restriction_mode: C
conference_enable_helpdesk:
type: boolean
default: False
restriction_mode: C
applause_enable:
type: boolean
default: False
restriction_mode: C
applause_type:
type: string
enum:
- applause-type-bar
- applause-type-particles
default: applause-type-bar
restriction_mode: C
applause_show_level:
type: boolean
default: False
restriction_mode: C
applause_min_amount:
type: number
default: 1
minimum: 0
restriction_mode: C
applause_max_amount:
type: number
default: 0
minimum: 0
restriction_mode: C
applause_timeout:
type: number
default: 5
minimum: 0
restriction_mode: C
applause_particle_image_url:
type: string
restriction_mode: C
# Projector countdown
projector_countdown_default_time:
type: number
default: 60
required: true
restriction_mode: B
projector_countdown_warning_time:
type: number
minimum: 0
default: 0
required: true
restriction_mode: B
# Exports
export_csv_encoding:
type: string
enum:
- utf-8
- iso-8859-15
default: utf-8
restriction_mode: B
export_csv_separator:
type: string
default: ";"
restriction_mode: B
export_pdf_pagenumber_alignment:
type: string
enum:
- left
- right
- center
default: center
restriction_mode: B
export_pdf_fontsize:
type: number
enum:
- 10
- 11
- 12
default: 10
restriction_mode: B
export_pdf_line_height:
type: float
default: 1.25
minimum: 1.0
restriction_mode: B
export_pdf_page_margin_left:
type: number
default: 20
minimum: 0
restriction_mode: B
export_pdf_page_margin_top:
type: number
default: 25
minimum: 0
restriction_mode: B
export_pdf_page_margin_right:
type: number
default: 20
minimum: 0
restriction_mode: B
export_pdf_page_margin_bottom:
type: number
default: 20
minimum: 0
restriction_mode: B
export_pdf_pagesize:
type: string
enum:
- A4
- A5
default: A4
restriction_mode: B
# Agenda
agenda_show_subtitles:
type: boolean
default: False
restriction_mode: B
agenda_enable_numbering:
type: boolean
default: True
restriction_mode: B
agenda_number_prefix:
type: string
maxLength: 20
restriction_mode: B
agenda_numeral_system:
type: string
enum:
- arabic
- roman
default: arabic
restriction_mode: B
agenda_item_creation:
type: string
enum:
- always
- never
- default_yes
- default_no
default: default_no
restriction_mode: B
agenda_new_items_default_visibility:
type: string