mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-02-13 21:33:20 +01:00
Redirect away from consent action if consent is already given
This commit is contained in:
parent
0b76ceb73d
commit
4d4296de19
1 changed files with 2 additions and 0 deletions
|
@ -4,6 +4,8 @@ class FeedbackController < ApplicationController
|
|||
before_action :canny_consent_given?, only: %w(features bugs)
|
||||
|
||||
def consent
|
||||
redirect_to feedback_bugs_path if current_user.has_role? :canny_consent
|
||||
|
||||
if params[:consent] === 'true' then
|
||||
current_user.add_role :canny_consent
|
||||
redirect_to feedback_bugs_path
|
||||
|
|
Loading…
Reference in a new issue