Fixes #218
Added check in poll card that allows setting the value of results_enabled flag. Access to stats/results now is controlled with abilities. Polls related to proposals will be accessible to the proposal author like they were administrators.
This commit is contained in:
@@ -167,8 +167,12 @@ describe Abilities::Common do
|
||||
end
|
||||
|
||||
describe 'proposal polls' do
|
||||
let(:poll) { create(:poll, related: own_proposal) }
|
||||
|
||||
it { should be_able_to(:manage_polls, own_proposal) }
|
||||
it { should_not be_able_to(:manage_polls, proposal) }
|
||||
it { should_not be_able_to(:stats, poll) }
|
||||
it { should be_able_to(:results, poll) }
|
||||
end
|
||||
|
||||
describe 'publishing proposals' do
|
||||
|
||||
Reference in New Issue
Block a user