Add authorization rule for create user by unsigned user
Add authorization to failed user save path cause it was complaining that no authorization was performed in that path.
This commit is contained in:
parent
dcb98c49f9
commit
e851c0b4ff
3 changed files with 3 additions and 1 deletions
|
|
@ -34,6 +34,7 @@ class ProposalController < ApplicationController
|
|||
# If user is not signed in then first create new user and then sign them in
|
||||
unless current_user
|
||||
@user = User.new(user_params)
|
||||
authorize! :create, @user
|
||||
if @user.save
|
||||
sign_in(@user)
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue