Add cancancan and the first ability definitions for site_controller

This commit is contained in:
Andy Allan 2018-03-01 10:24:35 +08:00 committed by Chris Flipse
parent 727ee97a3f
commit ffa65d4d72
6 changed files with 50 additions and 1 deletions

View file

@ -1,6 +1,8 @@
class UserController < ApplicationController
layout "site", :except => [:api_details]
skip_authorization_check :only => [:login, :logout]
skip_before_action :verify_authenticity_token, :only => [:api_read, :api_details, :api_gpx_files, :auth_success]
before_action :disable_terms_redirect, :only => [:terms, :save, :logout, :api_details]
before_action :authorize, :only => [:api_details, :api_gpx_files]