ssh_access_spec.rb revision d60ddfb99765ab4fe956503f3f83d9c8f493eb99
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehaserequire 'spec_helper'
d60ddfb99765ab4fe956503f3f83d9c8f493eb99Tim Reddehase let(:permission) { create :permission, role: 'reader' }
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase it 'should allow read on public readable repository' do
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase access = described_class.determine_permission('read', nil, repository)
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase it 'should disallow write on public readable repository' do
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase access = described_class.determine_permission('write', nil, repository)
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase it 'should allow read on public read-writeable repository' do
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase access = described_class.determine_permission('read', nil, repository)
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase it 'should allow write on public read-writeable repository' do
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase access = described_class.determine_permission('write', nil, repository)
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase it 'should disallow read on private readable repository' do
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase access = described_class.determine_permission('read', nil, repository)
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase it 'should disallow write on private readable repository' do
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase access = described_class.determine_permission('write', nil, repository)
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase it 'should disallow read on private read-writeable repository' do
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase access = described_class.determine_permission('read', nil, repository)
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase it 'should disallow write on private read-writeable repository' do
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase access = described_class.determine_permission('write', nil, repository)
d60ddfb99765ab4fe956503f3f83d9c8f493eb99Tim Reddehase let(:permission) { create :permission, role: 'owner' }
d60ddfb99765ab4fe956503f3f83d9c8f493eb99Tim Reddehase it 'should allow write on public readable repository' do
d60ddfb99765ab4fe956503f3f83d9c8f493eb99Tim Reddehase access = described_class.determine_permission('write', permission, repository)
d60ddfb99765ab4fe956503f3f83d9c8f493eb99Tim Reddehase it 'should allow write on private readable repository' do
d60ddfb99765ab4fe956503f3f83d9c8f493eb99Tim Reddehase access = described_class.determine_permission('write', permission, repository)
d60ddfb99765ab4fe956503f3f83d9c8f493eb99Tim Reddehase let(:permission) { create :permission, role: 'editor' }
d60ddfb99765ab4fe956503f3f83d9c8f493eb99Tim Reddehase it 'should allow write on public readable repository' do
d60ddfb99765ab4fe956503f3f83d9c8f493eb99Tim Reddehase access = described_class.determine_permission('write', permission, repository)
d60ddfb99765ab4fe956503f3f83d9c8f493eb99Tim Reddehase it 'should allow write on private readable repository' do
d60ddfb99765ab4fe956503f3f83d9c8f493eb99Tim Reddehase access = described_class.determine_permission('write', permission, repository)
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase it 'should allow read on public readable repository' do
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase access = described_class.determine_permission('read', permission, repository)
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase it 'should disallow write on public readable repository' do
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase access = described_class.determine_permission('write', permission, repository)
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase it 'should allow read on public read-writeable repository' do
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase access = described_class.determine_permission('read', permission, repository)
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase it 'should allow write on public read-writeable repository' do
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase access = described_class.determine_permission('write', permission, repository)
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase it 'should allow read on private readable repository' do
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase access = described_class.determine_permission('read', permission, repository)
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase it 'should disallow write on private readable repository' do
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase access = described_class.determine_permission('write', permission, repository)
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase it 'should allow read on private read-writeable repository' do
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase access = described_class.determine_permission('read', permission, repository)
0dcf2700340141bc08344977e966e7ec095a8e8eTim Reddehase it 'should allow write on private read-writeable repository' do