updates permissions for direct messages
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
class DirectMessagesController < ApplicationController
|
||||
skip_authorization_check
|
||||
load_and_authorize_resource
|
||||
|
||||
def new
|
||||
@receiver = User.find(params[:user_id])
|
||||
|
||||
@@ -46,6 +46,8 @@ module Abilities
|
||||
can :vote_featured, Proposal
|
||||
can :vote, SpendingProposal
|
||||
can :create, SpendingProposal
|
||||
can :create, DirectMessage
|
||||
can :show, DirectMessage, sender_id: user.id
|
||||
end
|
||||
|
||||
can [:new, :create, :show], ProposalNotification do |notification|
|
||||
|
||||
Reference in New Issue
Block a user