Merge remote-tracking branch 'upstream/pull/2109'

This commit is contained in:
Tom Hughes 2019-01-09 17:27:16 +00:00
commit 6c2432ae42
3 changed files with 7 additions and 2 deletions

View file

@ -23,7 +23,9 @@ class Ability
if user
can :welcome, :site
can [:index, :new, :create, :show, :edit, :update, :destroy], ClientApplication
can [:create, :edit, :comment, :subscribe, :unsubscribe], DiaryEntry
can [:new, :create, :reply, :show, :inbox, :outbox, :mark, :destroy], Message
can [:close, :reopen], Note
can [:new, :create], Report
can [:mine, :new, :create, :edit, :update, :delete, :api_create, :api_read, :api_update, :api_delete, :api_data], Trace

View file

@ -3,7 +3,9 @@ class MessagesController < ApplicationController
before_action :authorize_web
before_action :set_locale
before_action :require_user
authorize_resource
before_action :lookup_user, :only => [:new, :create]
before_action :check_database_readable
before_action :check_database_writable, :only => [:new, :create, :reply, :mark, :destroy]

View file

@ -3,7 +3,8 @@ class OauthClientsController < ApplicationController
before_action :authorize_web
before_action :set_locale
before_action :require_user
authorize_resource :class => ClientApplication
def index
@client_applications = current_user.client_applications