diff --git a/models.yml b/models.yml index 2eecf2d1..3f634c7f 100644 --- a/models.yml +++ b/models.yml @@ -57,6 +57,33 @@ # 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 @@ -113,14 +140,7 @@ organization: default_language: type: string restriction_mode: A - enum: - - en - - de - - it - - es - - ru - - cs - - fr + enum: *languages required: true # Saml settings @@ -764,14 +784,7 @@ meeting: language: type: string restriction_mode: A - enum: - - en - - de - - it - - es - - ru - - cs - - fr + enum: *languages required: true constant: true @@ -1233,10 +1246,7 @@ meeting: # Motion poll motion_poll_ballot_paper_selection: type: string - enum: - - NUMBER_OF_DELEGATES - - NUMBER_OF_ALL_PARTICIPANTS - - CUSTOM_NUMBER + enum: *ballot_paper_selection default: CUSTOM_NUMBER restriction_mode: B motion_poll_ballot_paper_number: @@ -1249,16 +1259,7 @@ meeting: restriction_mode: B motion_poll_default_onehundred_percent_base: type: string - enum: - - "Y" - - "YN" - - "YNA" - - "N" - - "valid" - - "cast" - - "entitled" - - "entitled_present" - - "disabled" + enum: *onehundred_percent_bases default: YNA restriction_mode: B motion_poll_default_group_ids: @@ -1267,9 +1268,7 @@ meeting: restriction_mode: B motion_poll_default_backend: type: string - enum: - - long - - fast + enum: *poll_backends default: fast restriction_mode: B @@ -1379,10 +1378,7 @@ meeting: # Assignment polls assignment_poll_ballot_paper_selection: type: string - enum: - - NUMBER_OF_DELEGATES - - NUMBER_OF_ALL_PARTICIPANTS - - CUSTOM_NUMBER + enum: *ballot_paper_selection default: CUSTOM_NUMBER restriction_mode: B assignment_poll_ballot_paper_number: @@ -1411,16 +1407,7 @@ meeting: restriction_mode: B assignment_poll_default_onehundred_percent_base: type: string - enum: - - "Y" - - "YN" - - "YNA" - - "N" - - "valid" - - "cast" - - "entitled" - - "entitled_present" - - "disabled" + enum: *onehundred_percent_bases default: valid restriction_mode: B assignment_poll_default_group_ids: @@ -1429,19 +1416,14 @@ meeting: restriction_mode: B assignment_poll_default_backend: type: string - enum: - - long - - fast + enum: *poll_backends default: fast restriction_mode: B # Polls poll_ballot_paper_selection: type: string - enum: - - NUMBER_OF_DELEGATES - - NUMBER_OF_ALL_PARTICIPANTS - - CUSTOM_NUMBER + enum: *ballot_paper_selection restriction_mode: B poll_ballot_paper_number: type: number @@ -1458,16 +1440,7 @@ meeting: restriction_mode: B poll_default_onehundred_percent_base: type: string - enum: - - "Y" - - "YN" - - "YNA" - - "N" - - "valid" - - "cast" - - "entitled" - - "entitled_present" - - "disabled" + enum: *onehundred_percent_bases default: YNA restriction_mode: B poll_default_group_ids: @@ -1476,9 +1449,7 @@ meeting: restriction_mode: B poll_default_backend: type: string - enum: - - long - - fast + enum: *poll_backends default: fast restriction_mode: B poll_couple_countdown: @@ -3266,9 +3237,7 @@ poll: backend: type: string required: True - enum: - - long - - fast + enum: *poll_backends default: fast restriction_mode: A is_pseudoanonymized: @@ -3322,16 +3291,7 @@ poll: onehundred_percent_base: type: string required: true - enum: - - "Y" - - "YN" - - "YNA" - - "N" - - "valid" - - "cast" - - "entitled" - - "entitled_present" - - "disabled" + enum: *onehundred_percent_bases default: disabled restriction_mode: A votesvalid: