mirror of
https://github.com/mastodon/mastodon.git
synced 2026-06-11 02:00:48 -05:00
Some checks failed
Check i18n / check-i18n (push) Waiting to run
Chromatic / Check for relevant changes (push) Waiting to run
Chromatic / Run Chromatic (push) Blocked by required conditions
CodeQL / Analyze (actions) (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (ruby) (push) Waiting to run
Check formatting / lint (push) Waiting to run
Ruby Testing / build (production) (push) Waiting to run
Ruby Testing / build (test) (push) Waiting to run
Ruby Testing / test (.ruby-version) (push) Blocked by required conditions
Ruby Testing / test (3.3) (push) Blocked by required conditions
Ruby Testing / test (3.4) (push) Blocked by required conditions
Ruby Testing / End to End testing (.ruby-version) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.3) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.4) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:7.17.29) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:8.19.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, opensearchproject/opensearch:2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.3, docker.elastic.co/elasticsearch/elasticsearch:7.17.29) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.4, docker.elastic.co/elasticsearch/elasticsearch:7.17.29) (push) Blocked by required conditions
Bundler Audit / security (push) Has been cancelled
Haml Linting / lint (push) Has been cancelled
Ruby Linting / lint (push) Has been cancelled
Historical data migration test / test (14-alpine) (push) Has been cancelled
Historical data migration test / test (15-alpine) (push) Has been cancelled
Historical data migration test / test (16-alpine) (push) Has been cancelled
Historical data migration test / test (17-alpine) (push) Has been cancelled
65 lines
1.9 KiB
Plaintext
65 lines
1.9 KiB
Plaintext
= render 'shared/error_messages', object: form.object
|
|
|
|
- if form.object.everyone?
|
|
.flash-message.info
|
|
= t('admin.roles.everyone_full_description_html')
|
|
- else
|
|
.fields-group
|
|
= form.input :name,
|
|
wrapper: :with_label
|
|
|
|
- unless current_user.role == form.object
|
|
.fields-group
|
|
= form.input :position,
|
|
input_html: { max: current_user.role.position - 1 },
|
|
wrapper: :with_label
|
|
|
|
.fields-group
|
|
= form.input :color,
|
|
input_html: { placeholder: '#000000', type: 'color' },
|
|
wrapper: :with_label
|
|
|
|
%hr.spacer/
|
|
|
|
.fields-group
|
|
= form.input :highlighted,
|
|
wrapper: :with_label
|
|
|
|
- if current_user.role.administrator? || current_user.role != form.object
|
|
.fields-group
|
|
= form.input :require_2fa,
|
|
wrapper: :with_label
|
|
|
|
%hr.spacer/
|
|
|
|
.fields-group
|
|
= form.input :collection_limit,
|
|
wrapper: :with_label
|
|
|
|
%hr.spacer/
|
|
|
|
- unless current_user.role == form.object
|
|
|
|
.field-group
|
|
.input.with_block_label
|
|
%label= t('simple_form.labels.user_role.permissions_as_keys')
|
|
%span.hint= t('simple_form.hints.user_role.permissions_as_keys')
|
|
|
|
- (form.object.everyone? ? UserRole::Flags::CATEGORIES.slice(:invites) : UserRole::Flags::CATEGORIES).each do |category, permissions|
|
|
%h2= t(category, scope: 'admin.roles.categories')
|
|
|
|
= form.input :permissions_as_keys,
|
|
as: :check_boxes,
|
|
collection_wrapper_tag: 'ul',
|
|
collection: permissions,
|
|
disabled: disable_permissions?(permissions),
|
|
hint: false,
|
|
include_blank: false,
|
|
item_wrapper_tag: 'li',
|
|
label_method: ->(privilege) { privilege_label(privilege) },
|
|
label: false,
|
|
required: false,
|
|
wrapper: :with_block_label
|
|
|
|
%hr.spacer/
|