Allow administrators to run local census records importation
Allow only administrator users to run local census records importation process
This commit is contained in:
committed by
Javi Martín
parent
d221198106
commit
0239efef9d
@@ -105,6 +105,7 @@ module Abilities
|
|||||||
can [:edit, :update], DownloadSetting
|
can [:edit, :update], DownloadSetting
|
||||||
|
|
||||||
can :manage, LocalCensusRecord
|
can :manage, LocalCensusRecord
|
||||||
|
can [:create, :read], LocalCensusRecords::Import
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -97,4 +97,6 @@ describe Abilities::Administrator do
|
|||||||
it { is_expected.to be_able_to :manage, dashboard_administrator_task }
|
it { is_expected.to be_able_to :manage, dashboard_administrator_task }
|
||||||
|
|
||||||
it { should be_able_to(:manage, LocalCensusRecord) }
|
it { should be_able_to(:manage, LocalCensusRecord) }
|
||||||
|
it { should be_able_to(:create, LocalCensusRecords::Import) }
|
||||||
|
it { should be_able_to(:show, LocalCensusRecords::Import) }
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ describe Abilities::Everyone do
|
|||||||
|
|
||||||
it { should_not be_able_to(:manage, Dashboard::Action) }
|
it { should_not be_able_to(:manage, Dashboard::Action) }
|
||||||
it { should_not be_able_to(:manage, LocalCensusRecord) }
|
it { should_not be_able_to(:manage, LocalCensusRecord) }
|
||||||
|
it { should_not be_able_to(:create, LocalCensusRecords::Import) }
|
||||||
|
it { should_not be_able_to(:show, LocalCensusRecords::Import) }
|
||||||
|
|
||||||
context "when accessing poll results" do
|
context "when accessing poll results" do
|
||||||
let(:results_enabled) { true }
|
let(:results_enabled) { true }
|
||||||
|
|||||||
Reference in New Issue
Block a user