Jelajahi Sumber

Fix School creation permission check

Frans Bergman 7 tahun lalu
induk
melakukan
0b63c0af2b
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      app/controllers/schools_controller.rb

+ 1 - 1
app/controllers/schools_controller.rb

@@ -1,6 +1,6 @@
 class SchoolsController < ApplicationController
 class SchoolsController < ApplicationController
   before_action :set_school, only: [:show, :edit, :update, :destroy]
   before_action :set_school, only: [:show, :edit, :update, :destroy]
-  before_action :check_admin, only: [:new, :edit, :create, :update]
+  before_action :check_admin, only: [:edit, :update]
   before_action :check_global_admin, only: [:new, :create]
   before_action :check_global_admin, only: [:new, :create]
 
 
   def show
   def show