mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 15:58:50 +00:00
Merge commit 'aa04efb92a47cf27c1aafb2aeb21584e91c526ac' into glitch-soc/merge-upstream
Conflicts: - `app/models/user_settings.rb`: Not a real conflict, upstream added a setting on a line adjacent to a glitch-soc-only line. Added upstream's new setting.
This commit is contained in:
@@ -2,13 +2,17 @@
|
||||
|
||||
module Admin
|
||||
class RulesController < BaseController
|
||||
before_action :set_rule, except: [:index, :create]
|
||||
before_action :set_rule, except: [:index, :new, :create]
|
||||
|
||||
def index
|
||||
authorize :rule, :index?
|
||||
|
||||
@rules = Rule.ordered
|
||||
@rule = Rule.new
|
||||
end
|
||||
|
||||
def new
|
||||
authorize :rule, :create?
|
||||
@rule = Rule.new
|
||||
end
|
||||
|
||||
def edit
|
||||
@@ -24,7 +28,7 @@ module Admin
|
||||
redirect_to admin_rules_path
|
||||
else
|
||||
@rules = Rule.ordered
|
||||
render :index
|
||||
render :new
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user