Skip to content

Commit

Permalink
Merge pull request #63 from atsu1125/develop
Browse files Browse the repository at this point in the history
Change Moderator Privilege
  • Loading branch information
atsu1125 authored Jan 5, 2023
2 parents 2fba531 + 4617182 commit 4c9e535
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/policies/rule_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class RulePolicy < ApplicationPolicy
def index?
staff?
admin?
end

def create?
Expand Down
2 changes: 1 addition & 1 deletion config/navigation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
n.item :admin, safe_join([fa_icon('cogs fw'), t('admin.title')]), admin_dashboard_url, if: proc { current_user.staff? } do |s|
s.item :dashboard, safe_join([fa_icon('tachometer fw'), t('admin.dashboard.title')]), admin_dashboard_url
s.item :settings, safe_join([fa_icon('cogs fw'), t('admin.settings.title')]), edit_admin_settings_url, if: -> { current_user.admin? }, highlights_on: %r{/admin/settings}
s.item :rules, safe_join([fa_icon('gavel fw'), t('admin.rules.title')]), admin_rules_path, highlights_on: %r{/admin/rules}
s.item :rules, safe_join([fa_icon('gavel fw'), t('admin.rules.title')]), admin_rules_path, if: -> { current_user.admin? }, highlights_on: %r{/admin/rules}
s.item :announcements, safe_join([fa_icon('bullhorn fw'), t('admin.announcements.title')]), admin_announcements_path, highlights_on: %r{/admin/announcements}
s.item :custom_emojis, safe_join([fa_icon('smile-o fw'), t('admin.custom_emojis.title')]), admin_custom_emojis_url, highlights_on: %r{/admin/custom_emojis}
s.item :relays, safe_join([fa_icon('exchange fw'), t('admin.relays.title')]), admin_relays_url, if: -> { current_user.staff? && !whitelist_mode? }, highlights_on: %r{/admin/relays}
Expand Down

0 comments on commit 4c9e535

Please sign in to comment.