Skip to content

Commit

Permalink
Merge pull request #450 from OregonDigital/feature/ArchivistReviewing
Browse files Browse the repository at this point in the history
Enable reviewing capability for archivists.
  • Loading branch information
Thomas Johnson committed May 29, 2014
2 parents 6e8cb91 + 59c25d8 commit 090da39
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/ability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def role_permissions
end

def review_permissions
can [:review], GenericAsset if current_user.admin?
can [:review], GenericAsset if current_user.admin? || current_user.archivist?
end

def ingest_permissions
Expand Down
11 changes: 11 additions & 0 deletions spec/features/review_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@
end
end
end
context "when logged in as an archivist" do
let(:user) {FactoryGirl.create(:archivist)}
context "on the review page" do
before(:each) do
visit reviewer_index_path
end
it "should let them in" do
expect(page).not_to have_content("You do not have permission to review.")
end
end
end
context "when logged in as an admin" do
let(:user) {FactoryGirl.create(:admin)}

Expand Down

0 comments on commit 090da39

Please sign in to comment.