mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-03 14:19:01 +02:00
Merge pull request #8556 from overleaf/em-tl-image-alpha-only
Show new TeX Live images to alpha users GitOrigin-RevId: 4a4a96cc1a6661720fcc14dd1ffae275d19a004a
This commit is contained in:
@@ -19,6 +19,7 @@ describe('ProjectHelper', function () {
|
||||
this.adminUser = {
|
||||
_id: 'admin-user-id',
|
||||
isAdmin: true,
|
||||
alphaProgram: true,
|
||||
}
|
||||
|
||||
this.Settings = {
|
||||
@@ -29,7 +30,7 @@ describe('ProjectHelper', function () {
|
||||
{
|
||||
imageName: 'texlive-full:2020.1',
|
||||
imageDesc: 'TeX Live 2020',
|
||||
adminOnly: true,
|
||||
alphaOnly: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -267,7 +268,7 @@ describe('ProjectHelper', function () {
|
||||
})
|
||||
|
||||
describe('getAllowedImagesForUser', function () {
|
||||
it('filters out admin-only images when the user is anonymous', function () {
|
||||
it('filters out alpha-only images when the user is anonymous', function () {
|
||||
const images = this.ProjectHelper.getAllowedImagesForUser(null)
|
||||
const imageNames = images.map(image => image.imageName)
|
||||
expect(imageNames).to.deep.equal([
|
||||
@@ -276,7 +277,7 @@ describe('ProjectHelper', function () {
|
||||
])
|
||||
})
|
||||
|
||||
it('filters out admin-only images when the user is not admin', function () {
|
||||
it('filters out alpha-only images when the user is not admin', function () {
|
||||
const images = this.ProjectHelper.getAllowedImagesForUser(this.user)
|
||||
const imageNames = images.map(image => image.imageName)
|
||||
expect(imageNames).to.deep.equal([
|
||||
|
||||
Reference in New Issue
Block a user