Merge pull request #1580 from sharelatex/ta-entity-create-form-fix-2
Fix Publisher Creation Form Take2 GitOrigin-RevId: a51512cc48067f50ba05fa371ed1d759d3fca985
This commit is contained in:
committed by
sharelatex
parent
a1e16c9676
commit
e4c684786d
@@ -67,6 +67,15 @@ describe "UserMembershipAuthorization", ->
|
||||
expect(path).to.match /create/
|
||||
done()
|
||||
|
||||
it 'handle entity not found a non-admin can create', (done) ->
|
||||
@user.staffAccess = { institutionManagement: true }
|
||||
@UserMembershipHandler.getEntity.yields(null, null)
|
||||
@UserMembershipHandler.getEntityWithoutAuthorizationCheck.yields(null, null)
|
||||
@UserMembershipAuthorization.requirePublisherMetricsAccess @req, redirect: (path) =>
|
||||
expect(path).to.extist
|
||||
expect(path).to.match /create/
|
||||
done()
|
||||
|
||||
it 'handle entity not found an admin cannot create', (done) ->
|
||||
@user.isAdmin = true
|
||||
@UserMembershipHandler.getEntity.yields(null, null)
|
||||
|
||||
Reference in New Issue
Block a user