Admin interface #6
|
@ -1,5 +1,13 @@
|
||||||
module Management
|
module Management
|
||||||
class ManagementController < ::ApplicationController
|
class ManagementController < ::ApplicationController
|
||||||
|
before_action :authenticate_user!, :authorize_user!
|
||||||
|
|
||||||
layout 'management'
|
layout 'management'
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def authorize_user!
|
||||||
|
head :forbidden unless current_user.admin?
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue