make requestinvite controller method explicit
This commit is contained in:
parent
c1acaba941
commit
9699b41159
2 changed files with 15 additions and 1 deletions
|
@ -1,11 +1,11 @@
|
|||
# frozen_string_literal: true
|
||||
class MainController < ApplicationController
|
||||
before_action :authorize_main
|
||||
after_action :verify_authorized
|
||||
after_action :verify_policy_scoped, only: [:home]
|
||||
|
||||
# GET /
|
||||
def home
|
||||
authorize :Main
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
if !authenticated?
|
||||
|
@ -17,4 +17,14 @@ class MainController < ApplicationController
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
# GET /request
|
||||
def requestinvite
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def authorize_main
|
||||
authorize :Main
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,4 +3,8 @@ class MainPolicy < ApplicationPolicy
|
|||
def home?
|
||||
true
|
||||
end
|
||||
|
||||
def requestinvite?
|
||||
true
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue