Improve readme for better authentication integration
This commit is contained in:
+1
-1
@@ -56,7 +56,7 @@ Cmtool is looking for an authorize_cmtool method present in the application cont
|
|||||||
private
|
private
|
||||||
|
|
||||||
def authorize_cmtool
|
def authorize_cmtool
|
||||||
redirect_to root_path, alert: t('general.unauthorized'), status: 403 unless current_user.present? && current_user.admin?
|
redirect_to main_app.root_path, alert: t('general.unauthorized') unless current_user.present? && current_user.is_admin?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user