text
stringlengths
1
2.83M
id
stringlengths
16
152
metadata
dict
__index_level_0__
int64
0
949
const sinon = require('sinon') const { expect } = require('chai') const modulePath = '../../../../app/src/Features/Project/ProjectGetter.js' const SandboxedModule = require('sandboxed-module') const { ObjectId } = require('mongodb') describe('ProjectGetter', function () { beforeEach(function () { this.callback = sinon.stub() this.project = { _id: new ObjectId() } this.projectIdStr = this.project._id.toString() this.deletedProject = { deleterData: { wombat: 'potato' } } this.userId = new ObjectId() this.DeletedProject = { find: sinon.stub().yields(null, [this.deletedProject]), } this.Project = { find: sinon.stub(), findOne: sinon.stub().yields(null, this.project), } this.CollaboratorsGetter = { getProjectsUserIsMemberOf: sinon.stub().yields(null, { readAndWrite: [], readOnly: [], tokenReadAndWrite: [], tokenReadOnly: [], }), } this.LockManager = { runWithLock: sinon .stub() .callsFake((namespace, id, runner, callback) => runner(callback)), } this.db = { projects: { findOne: sinon.stub().yields(null, this.project), }, users: {}, } this.ProjectEntityMongoUpdateHandler = { lockKey: sinon.stub().returnsArg(0), } this.ProjectGetter = SandboxedModule.require(modulePath, { requires: { '../../infrastructure/mongodb': { db: this.db, ObjectId }, '@overleaf/metrics': { timeAsyncMethod: sinon.stub(), }, '../../models/Project': { Project: this.Project, }, '../../models/DeletedProject': { DeletedProject: this.DeletedProject, }, '../Collaborators/CollaboratorsGetter': this.CollaboratorsGetter, '../../infrastructure/LockManager': this.LockManager, './ProjectEntityMongoUpdateHandler': this .ProjectEntityMongoUpdateHandler, }, }) }) describe('getProjectWithoutDocLines', function () { beforeEach(function () { this.ProjectGetter.getProject = sinon.stub().yields() }) describe('passing an id', function () { beforeEach(function () { this.ProjectGetter.getProjectWithoutDocLines( this.project._id, this.callback ) }) it('should call find with the project id', function () { this.ProjectGetter.getProject .calledWith(this.project._id) .should.equal(true) }) it('should exclude the doc lines', function () { const excludes = { 'rootFolder.docs.lines': 0, 'rootFolder.folders.docs.lines': 0, 'rootFolder.folders.folders.docs.lines': 0, 'rootFolder.folders.folders.folders.docs.lines': 0, 'rootFolder.folders.folders.folders.folders.docs.lines': 0, 'rootFolder.folders.folders.folders.folders.folders.docs.lines': 0, 'rootFolder.folders.folders.folders.folders.folders.folders.docs.lines': 0, 'rootFolder.folders.folders.folders.folders.folders.folders.folders.docs.lines': 0, } this.ProjectGetter.getProject .calledWith(this.project._id, excludes) .should.equal(true) }) it('should call the callback', function () { this.callback.called.should.equal(true) }) }) }) describe('getProjectWithOnlyFolders', function () { beforeEach(function () { this.ProjectGetter.getProject = sinon.stub().yields() }) describe('passing an id', function () { beforeEach(function () { this.ProjectGetter.getProjectWithOnlyFolders( this.project._id, this.callback ) }) it('should call find with the project id', function () { this.ProjectGetter.getProject .calledWith(this.project._id) .should.equal(true) }) it('should exclude the docs and files linesaaaa', function () { const excludes = { 'rootFolder.docs': 0, 'rootFolder.fileRefs': 0, 'rootFolder.folders.docs': 0, 'rootFolder.folders.fileRefs': 0, 'rootFolder.folders.folders.docs': 0, 'rootFolder.folders.folders.fileRefs': 0, 'rootFolder.folders.folders.folders.docs': 0, 'rootFolder.folders.folders.folders.fileRefs': 0, 'rootFolder.folders.folders.folders.folders.docs': 0, 'rootFolder.folders.folders.folders.folders.fileRefs': 0, 'rootFolder.folders.folders.folders.folders.folders.docs': 0, 'rootFolder.folders.folders.folders.folders.folders.fileRefs': 0, 'rootFolder.folders.folders.folders.folders.folders.folders.docs': 0, 'rootFolder.folders.folders.folders.folders.folders.folders.fileRefs': 0, 'rootFolder.folders.folders.folders.folders.folders.folders.folders.docs': 0, 'rootFolder.folders.folders.folders.folders.folders.folders.folders.fileRefs': 0, } this.ProjectGetter.getProject .calledWith(this.project._id, excludes) .should.equal(true) }) it('should call the callback with the project', function () { this.callback.called.should.equal(true) }) }) }) describe('getProject', function () { describe('without projection', function () { describe('with project id', function () { beforeEach(function () { this.ProjectGetter.getProject(this.projectIdStr, this.callback) }) it('should call findOne with the project id', function () { expect(this.db.projects.findOne.callCount).to.equal(1) expect( this.db.projects.findOne.lastCall.args[0]._id.toString() ).to.equal(this.projectIdStr) }) }) describe('without project id', function () { beforeEach(function () { this.ProjectGetter.getProject(null, this.callback) }) it('should callback with error', function () { expect(this.db.projects.findOne.callCount).to.equal(0) expect(this.callback.lastCall.args[0]).to.be.instanceOf(Error) }) }) }) describe('with projection', function () { beforeEach(function () { this.projection = { _id: 1 } }) describe('with project id', function () { beforeEach(function () { this.ProjectGetter.getProject( this.projectIdStr, this.projection, this.callback ) }) it('should call findOne with the project id', function () { expect(this.db.projects.findOne.callCount).to.equal(1) expect( this.db.projects.findOne.lastCall.args[0]._id.toString() ).to.equal(this.projectIdStr) expect(this.db.projects.findOne.lastCall.args[1]).to.deep.equal({ projection: this.projection, }) }) }) describe('without project id', function () { beforeEach(function () { this.ProjectGetter.getProject(null, this.callback) }) it('should callback with error', function () { expect(this.db.projects.findOne.callCount).to.equal(0) expect(this.callback.lastCall.args[0]).to.be.instanceOf(Error) }) }) }) }) describe('getProjectWithoutLock', function () { describe('without projection', function () { describe('with project id', function () { beforeEach(function () { this.ProjectGetter.getProjectWithoutLock( this.projectIdStr, this.callback ) }) it('should call findOne with the project id', function () { expect(this.db.projects.findOne.callCount).to.equal(1) expect( this.db.projects.findOne.lastCall.args[0]._id.toString() ).to.equal(this.projectIdStr) }) }) describe('without project id', function () { beforeEach(function () { this.ProjectGetter.getProjectWithoutLock(null, this.callback) }) it('should callback with error', function () { expect(this.db.projects.findOne.callCount).to.equal(0) expect(this.callback.lastCall.args[0]).to.be.instanceOf(Error) }) }) }) describe('with projection', function () { beforeEach(function () { this.projection = { _id: 1 } }) describe('with project id', function () { beforeEach(function () { this.ProjectGetter.getProjectWithoutLock( this.project._id, this.projection, this.callback ) }) it('should call findOne with the project id', function () { expect(this.db.projects.findOne.callCount).to.equal(1) expect( this.db.projects.findOne.lastCall.args[0]._id.toString() ).to.equal(this.projectIdStr) expect(this.db.projects.findOne.lastCall.args[1]).to.deep.equal({ projection: this.projection, }) }) }) describe('without project id', function () { beforeEach(function () { this.ProjectGetter.getProjectWithoutLock(null, this.callback) }) it('should callback with error', function () { expect(this.db.projects.findOne.callCount).to.equal(0) expect(this.callback.lastCall.args[0]).to.be.instanceOf(Error) }) }) }) }) describe('findAllUsersProjects', function () { beforeEach(function () { this.fields = { mock: 'fields' } this.Project.find .withArgs({ owner_ref: this.userId }, this.fields) .yields(null, ['mock-owned-projects']) this.CollaboratorsGetter.getProjectsUserIsMemberOf.yields(null, { readAndWrite: ['mock-rw-projects'], readOnly: ['mock-ro-projects'], tokenReadAndWrite: ['mock-token-rw-projects'], tokenReadOnly: ['mock-token-ro-projects'], }) this.ProjectGetter.findAllUsersProjects( this.userId, this.fields, this.callback ) }) it('should call the callback with all the projects', function () { this.callback .calledWith(null, { owned: ['mock-owned-projects'], readAndWrite: ['mock-rw-projects'], readOnly: ['mock-ro-projects'], tokenReadAndWrite: ['mock-token-rw-projects'], tokenReadOnly: ['mock-token-ro-projects'], }) .should.equal(true) }) }) describe('getProjectIdByReadAndWriteToken', function () { describe('when project find returns project', function () { this.beforeEach(function () { this.ProjectGetter.getProjectIdByReadAndWriteToken( 'token', this.callback ) }) it('should find project with token', function () { this.Project.findOne .calledWithMatch({ 'tokens.readAndWrite': 'token' }) .should.equal(true) }) it('should callback with project id', function () { this.callback.calledWith(null, this.project._id).should.equal(true) }) }) describe('when project not found', function () { this.beforeEach(function () { this.Project.findOne.yields(null, null) this.ProjectGetter.getProjectIdByReadAndWriteToken( 'token', this.callback ) }) it('should callback empty', function () { expect(this.callback.firstCall.args.length).to.equal(0) }) }) describe('when project find returns error', function () { this.beforeEach(function () { this.Project.findOne.yields('error') this.ProjectGetter.getProjectIdByReadAndWriteToken( 'token', this.callback ) }) it('should callback with error', function () { this.callback.calledWith('error').should.equal(true) }) }) }) describe('findUsersProjectsByName', function () { it('should perform a case-insensitive search', function (done) { this.Project.find .withArgs({ owner_ref: this.userId }) .yields(null, [ { name: 'find me!' }, { name: 'not me!' }, { name: 'FIND ME!' }, { name: 'Find Me!' }, ]) this.ProjectGetter.findUsersProjectsByName( this.userId, 'find me!', (err, projects) => { if (err != null) { return done(err) } projects .map(project => project.name) .should.have.members(['find me!', 'FIND ME!', 'Find Me!']) done() } ) }) it('should search collaborations as well', function (done) { this.Project.find .withArgs({ owner_ref: this.userId }) .yields(null, [{ name: 'find me!' }]) this.CollaboratorsGetter.getProjectsUserIsMemberOf.yields(null, { readAndWrite: [{ name: 'FIND ME!' }], readOnly: [{ name: 'Find Me!' }], tokenReadAndWrite: [{ name: 'find ME!' }], tokenReadOnly: [{ name: 'FIND me!' }], }) this.ProjectGetter.findUsersProjectsByName( this.userId, 'find me!', (err, projects) => { if (err != null) { return done(err) } expect(projects.map(project => project.name)).to.have.members([ 'find me!', 'FIND ME!', ]) done() } ) }) }) describe('getUsersDeletedProjects', function () { it('should look up the deleted projects by deletedProjectOwnerId', function (done) { this.ProjectGetter.getUsersDeletedProjects('giraffe', err => { if (err) { return done(err) } sinon.assert.calledWith(this.DeletedProject.find, { 'deleterData.deletedProjectOwnerId': 'giraffe', }) done() }) }) it('should pass the found projects to the callback', function (done) { this.ProjectGetter.getUsersDeletedProjects('giraffe', (err, docs) => { if (err) { return done(err) } expect(docs).to.deep.equal([this.deletedProject]) done() }) }) }) })
overleaf/web/test/unit/src/Project/ProjectGetterTests.js/0
{ "file_path": "overleaf/web/test/unit/src/Project/ProjectGetterTests.js", "repo_id": "overleaf", "token_count": 6392 }
582
const APP_ROOT = '../../../../app/src' const SandboxedModule = require('sandboxed-module') const sinon = require('sinon') const { expect } = require('chai') const modulePath = `${APP_ROOT}/Features/SamlLog/SamlLogHandler` describe('SamlLogHandler', function () { let SamlLog, SamlLogHandler, SamlLogModel let data, providerId, samlLog, sessionId beforeEach(function () { samlLog = { save: sinon.stub(), } SamlLog = function () { return samlLog } SamlLogModel = { SamlLog } SamlLogHandler = SandboxedModule.require(modulePath, { requires: { '../../models/SamlLog': SamlLogModel, }, }) data = { foo: true } providerId = 'provider-id' sessionId = 'session-id' }) describe('with valid data object', function () { beforeEach(function () { SamlLogHandler.log(providerId, sessionId, data) }) it('should log data', function () { samlLog.providerId.should.equal(providerId) samlLog.sessionId.should.equal(sessionId.substr(0, 8)) samlLog.jsonData.should.equal('{"foo":true}') expect(samlLog.data).to.be.undefined samlLog.save.should.have.been.calledOnce }) }) describe('when a json stringify error occurs', function () { beforeEach(function () { const circularRef = {} circularRef.circularRef = circularRef SamlLogHandler.log(providerId, sessionId, circularRef) }) it('should log without data and log error', function () { samlLog.providerId.should.equal(providerId) samlLog.sessionId.should.equal(sessionId.substr(0, 8)) expect(samlLog.data).to.be.undefined expect(samlLog.jsonData).to.be.undefined samlLog.save.should.have.been.calledOnce this.logger.error.should.have.been.calledOnce.and.calledWithMatch( { providerId, sessionId: sessionId.substr(0, 8) }, 'SamlLog JSON.stringify Error' ) }) }) describe('when logging error occurs', function () { beforeEach(function () { samlLog.save = sinon.stub().yields('error') SamlLogHandler.log(providerId, sessionId, data) }) it('should log error', function () { this.logger.error.should.have.been.calledOnce.and.calledWithMatch( { err: 'error', providerId, sessionId: sessionId.substr(0, 8) }, 'SamlLog Error' ) }) }) })
overleaf/web/test/unit/src/SamlLog/SamlLogHandlerTests.js/0
{ "file_path": "overleaf/web/test/unit/src/SamlLog/SamlLogHandlerTests.js", "repo_id": "overleaf", "token_count": 949 }
583
/* eslint-disable max-len, no-return-assign, no-unused-vars, */ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. /* * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ const SandboxedModule = require('sandboxed-module') const sinon = require('sinon') const { assert } = require('chai') const modulePath = '../../../../app/src/Features/Subscription/SubscriptionGroupController' const MockResponse = require('../helpers/MockResponse') describe('SubscriptionGroupController', function () { beforeEach(function () { this.user = { _id: '!@312431', email: 'user@email.com' } this.adminUserId = '123jlkj' this.subscriptionId = '123434325412' this.user_email = 'bob@gmail.com' this.req = { session: { user: { _id: this.adminUserId, email: this.user_email, }, }, params: { subscriptionId: this.subscriptionId, }, query: {}, } this.subscription = { _id: this.subscriptionId, } this.GroupHandler = { removeUserFromGroup: sinon.stub().callsArgWith(2) } this.SubscriptionLocator = { getSubscription: sinon.stub().callsArgWith(1, null, this.subscription), } this.SessionManager = { getLoggedInUserId(session) { return session.user._id }, getSessionUser(session) { return session.user }, } return (this.Controller = SandboxedModule.require(modulePath, { requires: { './SubscriptionGroupHandler': this.GroupHandler, './SubscriptionLocator': this.SubscriptionLocator, '../Authentication/SessionManager': this.SessionManager, }, })) }) describe('removeUserFromGroup', function () { it('should use the subscription id for the logged in user and take the user id from the params', function (done) { const userIdToRemove = '31231' this.req.params = { user_id: userIdToRemove } this.req.entity = this.subscription const res = { sendStatus: () => { this.GroupHandler.removeUserFromGroup .calledWith(this.subscriptionId, userIdToRemove) .should.equal(true) return done() }, } return this.Controller.removeUserFromGroup(this.req, res) }) }) describe('removeSelfFromGroup', function () { it('gets subscription and remove user', function (done) { const userIdToRemove = '31231' this.req.query = { subscriptionId: this.subscriptionId } const memberUserIdToremove = 123456789 this.req.session.user._id = memberUserIdToremove const res = { sendStatus: () => { sinon.assert.calledWith( this.SubscriptionLocator.getSubscription, this.subscriptionId ) sinon.assert.calledWith( this.GroupHandler.removeUserFromGroup, this.subscriptionId, memberUserIdToremove ) return done() }, } return this.Controller.removeSelfFromGroup(this.req, res) }) }) })
overleaf/web/test/unit/src/Subscription/SubscriptionGroupControllerTests.js/0
{ "file_path": "overleaf/web/test/unit/src/Subscription/SubscriptionGroupControllerTests.js", "repo_id": "overleaf", "token_count": 1321 }
584
const SandboxedModule = require('sandboxed-module') const sinon = require('sinon') const { expect } = require('chai') const { ObjectId } = require('mongodb') const Errors = require('../../../../app/src/Features/Errors/Errors') const MODULE_PATH = '../../../../app/src/Features/ThirdPartyDataStore/TpdsUpdateHandler.js' describe('TpdsUpdateHandler', function () { beforeEach(function () { this.clock = sinon.useFakeTimers() }) afterEach(function () { this.clock.restore() }) beforeEach(function () { this.projectName = 'My recipes' this.projects = { active1: { _id: new ObjectId(), name: this.projectName }, active2: { _id: new ObjectId(), name: this.projectName }, archived1: { _id: new ObjectId(), name: this.projectName, archived: [this.userId], }, archived2: { _id: new ObjectId(), name: this.projectName, archived: [this.userId], }, } this.userId = new ObjectId() this.source = 'dropbox' this.path = `/some/file` this.update = {} this.CooldownManager = { isProjectOnCooldown: sinon.stub().yields(null, false), } this.FileTypeManager = { shouldIgnore: sinon.stub().yields(null, false), } this.Modules = { hooks: { fire: sinon.stub().yields() }, } this.notification = { create: sinon.stub().yields(), } this.NotificationsBuilder = { dropboxDuplicateProjectNames: sinon.stub().returns(this.notification), } this.ProjectCreationHandler = { createBlankProject: sinon.stub().yields(null, this.projects.active1), } this.ProjectDeleter = { markAsDeletedByExternalSource: sinon.stub().yields(), } this.ProjectGetter = { findUsersProjectsByName: sinon.stub(), } this.ProjectHelper = { isArchivedOrTrashed: sinon.stub().returns(false), } this.ProjectHelper.isArchivedOrTrashed .withArgs(this.projects.archived1, this.userId) .returns(true) this.ProjectHelper.isArchivedOrTrashed .withArgs(this.projects.archived2, this.userId) .returns(true) this.RootDocManager = { setRootDocAutomatically: sinon.stub() } this.UpdateMerger = { deleteUpdate: sinon.stub().yields(), mergeUpdate: sinon.stub().yields(), } this.TpdsUpdateHandler = SandboxedModule.require(MODULE_PATH, { requires: { '../Cooldown/CooldownManager': this.CooldownManager, '../Uploads/FileTypeManager': this.FileTypeManager, '../../infrastructure/Modules': this.Modules, '../Notifications/NotificationsBuilder': this.NotificationsBuilder, '../Project/ProjectCreationHandler': this.ProjectCreationHandler, '../Project/ProjectDeleter': this.ProjectDeleter, '../Project/ProjectGetter': this.ProjectGetter, '../Project/ProjectHelper': this.ProjectHelper, '../Project/ProjectRootDocManager': this.RootDocManager, './UpdateMerger': this.UpdateMerger, }, }) }) describe('getting an update', function () { describe('with no matching project', function () { setupMatchingProjects([]) receiveUpdate() expectProjectCreated() expectUpdateProcessed() }) describe('with one matching active project', function () { setupMatchingProjects(['active1']) receiveUpdate() expectProjectNotCreated() expectUpdateProcessed() }) describe('with one matching archived project', function () { setupMatchingProjects(['archived1']) receiveUpdate() expectProjectNotCreated() expectUpdateNotProcessed() expectDropboxNotUnlinked() }) describe('with two matching active projects', function () { setupMatchingProjects(['active1', 'active2']) receiveUpdate() expectProjectNotCreated() expectUpdateNotProcessed() expectDropboxUnlinked() }) describe('with two matching archived projects', function () { setupMatchingProjects(['archived1', 'archived2']) receiveUpdate() expectProjectNotCreated() expectUpdateNotProcessed() expectDropboxNotUnlinked() }) describe('with one matching active and one matching archived project', function () { setupMatchingProjects(['active1', 'archived1']) receiveUpdate() expectProjectNotCreated() expectUpdateNotProcessed() expectDropboxUnlinked() }) describe('update to a file that should be ignored', function (done) { setupMatchingProjects(['active1']) beforeEach(function () { this.FileTypeManager.shouldIgnore.yields(null, true) }) receiveUpdate() expectProjectNotCreated() expectUpdateNotProcessed() expectDropboxNotUnlinked() }) describe('update to a project on cooldown', function (done) { setupMatchingProjects(['active1']) setupProjectOnCooldown() beforeEach(function (done) { this.TpdsUpdateHandler.newUpdate( this.userId, this.projectName, this.path, this.update, this.source, err => { expect(err).to.be.instanceof(Errors.TooManyRequestsError) done() } ) }) expectUpdateNotProcessed() }) }) describe('getting a file delete', function () { describe('with no matching project', function () { setupMatchingProjects([]) receiveFileDelete() expectDeleteNotProcessed() expectProjectNotDeleted() }) describe('with one matching active project', function () { setupMatchingProjects(['active1']) receiveFileDelete() expectDeleteProcessed() expectProjectNotDeleted() }) describe('with one matching archived project', function () { setupMatchingProjects(['archived1']) receiveFileDelete() expectDeleteNotProcessed() expectProjectNotDeleted() }) describe('with two matching active projects', function () { setupMatchingProjects(['active1', 'active2']) receiveFileDelete() expectDeleteNotProcessed() expectProjectNotDeleted() expectDropboxUnlinked() }) describe('with two matching archived projects', function () { setupMatchingProjects(['archived1', 'archived2']) receiveFileDelete() expectDeleteNotProcessed() expectProjectNotDeleted() expectDropboxNotUnlinked() }) describe('with one matching active and one matching archived project', function () { setupMatchingProjects(['active1', 'archived1']) receiveFileDelete() expectDeleteNotProcessed() expectProjectNotDeleted() expectDropboxUnlinked() }) }) describe('getting a project delete', function () { describe('with no matching project', function () { setupMatchingProjects([]) receiveProjectDelete() expectDeleteNotProcessed() expectProjectNotDeleted() }) describe('with one matching active project', function () { setupMatchingProjects(['active1']) receiveProjectDelete() expectDeleteNotProcessed() expectProjectDeleted() }) describe('with one matching archived project', function () { setupMatchingProjects(['archived1']) receiveProjectDelete() expectDeleteNotProcessed() expectProjectNotDeleted() }) describe('with two matching active projects', function () { setupMatchingProjects(['active1', 'active2']) receiveProjectDelete() expectDeleteNotProcessed() expectProjectNotDeleted() expectDropboxUnlinked() }) describe('with two matching archived projects', function () { setupMatchingProjects(['archived1', 'archived2']) receiveProjectDelete() expectDeleteNotProcessed() expectProjectNotDeleted() expectDropboxNotUnlinked() }) describe('with one matching active and one matching archived project', function () { setupMatchingProjects(['active1', 'archived1']) receiveProjectDelete() expectDeleteNotProcessed() expectProjectNotDeleted() expectDropboxUnlinked() }) }) }) /* Setup helpers */ function setupMatchingProjects(projectKeys) { beforeEach(function () { const projects = projectKeys.map(key => this.projects[key]) this.ProjectGetter.findUsersProjectsByName .withArgs(this.userId, this.projectName) .yields(null, projects) }) } function setupProjectOnCooldown() { beforeEach(function () { this.CooldownManager.isProjectOnCooldown .withArgs(this.projects.active1._id) .yields(null, true) }) } /* Test helpers */ function receiveUpdate() { beforeEach(function (done) { this.TpdsUpdateHandler.newUpdate( this.userId, this.projectName, this.path, this.update, this.source, done ) }) } function receiveFileDelete() { beforeEach(function (done) { this.TpdsUpdateHandler.deleteUpdate( this.userId, this.projectName, this.path, this.source, done ) }) } function receiveProjectDelete() { beforeEach(function (done) { this.TpdsUpdateHandler.deleteUpdate( this.userId, this.projectName, '/', this.source, done ) }) } /* Expectations */ function expectProjectCreated() { it('creates a project', function () { expect( this.ProjectCreationHandler.createBlankProject ).to.have.been.calledWith(this.userId, this.projectName) }) it('sets the root doc', function () { // Fire pending timers this.clock.runAll() expect(this.RootDocManager.setRootDocAutomatically).to.have.been.calledWith( this.projects.active1._id ) }) } function expectProjectNotCreated() { it('does not create a project', function () { expect(this.ProjectCreationHandler.createBlankProject).not.to.have.been .called }) it('does not set the root doc', function () { // Fire pending timers this.clock.runAll() expect(this.RootDocManager.setRootDocAutomatically).not.to.have.been.called }) } function expectUpdateProcessed() { it('processes the update', function () { expect(this.UpdateMerger.mergeUpdate).to.have.been.calledWith( this.userId, this.projects.active1._id, this.path, this.update, this.source ) }) } function expectUpdateNotProcessed() { it('does not process the update', function () { expect(this.UpdateMerger.mergeUpdate).not.to.have.been.called }) } function expectDropboxUnlinked() { it('unlinks Dropbox', function () { expect(this.Modules.hooks.fire).to.have.been.calledWith( 'removeDropbox', this.userId, 'duplicate-projects' ) }) it('creates a notification that dropbox was unlinked', function () { expect( this.NotificationsBuilder.dropboxDuplicateProjectNames ).to.have.been.calledWith(this.userId) expect(this.notification.create).to.have.been.calledWith(this.projectName) }) } function expectDropboxNotUnlinked() { it('does not unlink Dropbox', function () { expect(this.Modules.hooks.fire).not.to.have.been.called }) it('does not create a notification that dropbox was unlinked', function () { expect(this.NotificationsBuilder.dropboxDuplicateProjectNames).not.to.have .been.called }) } function expectDeleteProcessed() { it('processes the delete', function () { expect(this.UpdateMerger.deleteUpdate).to.have.been.calledWith( this.userId, this.projects.active1._id, this.path, this.source ) }) } function expectDeleteNotProcessed() { it('does not process the delete', function () { expect(this.UpdateMerger.deleteUpdate).not.to.have.been.called }) } function expectProjectDeleted() { it('deletes the project', function () { expect( this.ProjectDeleter.markAsDeletedByExternalSource ).to.have.been.calledWith(this.projects.active1._id) }) } function expectProjectNotDeleted() { it('does not delete the project', function () { expect(this.ProjectDeleter.markAsDeletedByExternalSource).not.to.have.been .called }) }
overleaf/web/test/unit/src/ThirdPartyDataStore/TpdsUpdateHandlerTests.js/0
{ "file_path": "overleaf/web/test/unit/src/ThirdPartyDataStore/TpdsUpdateHandlerTests.js", "repo_id": "overleaf", "token_count": 4581 }
585
const sinon = require('sinon') const assertCalledWith = sinon.assert.calledWith const assertNotCalled = sinon.assert.notCalled const { assert, expect } = require('chai') const modulePath = '../../../../app/src/Features/User/UserEmailsController.js' const SandboxedModule = require('sandboxed-module') const MockRequest = require('../helpers/MockRequest') const MockResponse = require('../helpers/MockResponse') const Errors = require('../../../../app/src/Features/Errors/Errors') describe('UserEmailsController', function () { beforeEach(function () { this.req = new MockRequest() this.req.sessionID = Math.random().toString() this.res = new MockResponse() this.next = sinon.stub() this.user = { _id: 'mock-user-id', email: 'example@overleaf.com' } this.UserGetter = { getUserFullEmails: sinon.stub(), getUserByAnyEmail: sinon.stub(), promises: { getUser: sinon.stub().resolves(this.user), }, } this.SessionManager = { getSessionUser: sinon.stub().returns(this.user), getLoggedInUserId: sinon.stub().returns(this.user._id), setInSessionUser: sinon.stub(), } this.Features = { hasFeature: sinon.stub(), } this.UserSessionsManager = { revokeAllUserSessions: sinon.stub().yields(), } this.UserUpdater = { addEmailAddress: sinon.stub(), removeEmailAddress: sinon.stub(), setDefaultEmailAddress: sinon.stub(), updateV1AndSetDefaultEmailAddress: sinon.stub(), promises: { addEmailAddress: sinon.stub().resolves(), }, } this.EmailHelper = { parseEmail: sinon.stub() } this.endorseAffiliation = sinon.stub().yields() this.InstitutionsAPI = { endorseAffiliation: this.endorseAffiliation, } this.HttpErrorHandler = { conflict: sinon.stub() } this.UserEmailsController = SandboxedModule.require(modulePath, { requires: { '../Authentication/SessionManager': this.SessionManager, '../../infrastructure/Features': this.Features, './UserSessionsManager': this.UserSessionsManager, './UserGetter': this.UserGetter, './UserUpdater': this.UserUpdater, '../Email/EmailHandler': (this.EmailHandler = { promises: { sendEmail: sinon.stub().resolves(), }, }), '../Helpers/EmailHelper': this.EmailHelper, './UserEmailsConfirmationHandler': (this.UserEmailsConfirmationHandler = { sendReconfirmationEmail: sinon.stub(), promises: { sendConfirmationEmail: sinon.stub().resolves(), }, }), '../Institutions/InstitutionsAPI': this.InstitutionsAPI, '../Errors/HttpErrorHandler': this.HttpErrorHandler, }, }) }) describe('List', function () { beforeEach(function () {}) it('lists emails', function (done) { const fullEmails = [{ some: 'data' }] this.UserGetter.getUserFullEmails.callsArgWith(1, null, fullEmails) this.UserEmailsController.list(this.req, { json: response => { assert.deepEqual(response, fullEmails) assertCalledWith(this.UserGetter.getUserFullEmails, this.user._id) done() }, }) }) }) describe('Add', function () { beforeEach(function () { this.newEmail = 'new_email@baz.com' this.req.body = { email: this.newEmail, university: { name: 'University Name' }, department: 'Department', role: 'Role', } this.EmailHelper.parseEmail.returns(this.newEmail) this.UserEmailsConfirmationHandler.sendConfirmationEmail = sinon .stub() .yields() }) it('passed audit log to addEmailAddress', function (done) { this.res.sendStatus = sinon.stub() this.res.sendStatus.callsFake(() => { const addCall = this.UserUpdater.promises.addEmailAddress.lastCall expect(addCall.args[3]).to.deep.equal({ initiatorId: this.user._id, ipAddress: this.req.ip, }) done() }) this.UserEmailsController.add(this.req, this.res) }) it('adds new email', function (done) { this.UserEmailsController.add( this.req, { sendStatus: code => { code.should.equal(204) assertCalledWith(this.EmailHelper.parseEmail, this.newEmail) assertCalledWith( this.UserUpdater.promises.addEmailAddress, this.user._id, this.newEmail ) const affiliationOptions = this.UserUpdater.promises.addEmailAddress .lastCall.args[2] Object.keys(affiliationOptions).length.should.equal(3) affiliationOptions.university.should.equal(this.req.body.university) affiliationOptions.department.should.equal(this.req.body.department) affiliationOptions.role.should.equal(this.req.body.role) done() }, }, this.next ) }) it('sends a security alert email', function (done) { this.res.sendStatus = sinon.stub() this.res.sendStatus.callsFake(() => { const emailCall = this.EmailHandler.promises.sendEmail.getCall(0) emailCall.args[0].should.to.equal('securityAlert') emailCall.args[1].to.should.equal(this.user.email) emailCall.args[1].actionDescribed.should.contain( 'a secondary email address' ) emailCall.args[1].to.should.equal(this.user.email) emailCall.args[1].message[0].should.contain(this.newEmail) done() }) this.UserEmailsController.add(this.req, this.res) }) it('sends an email confirmation', function (done) { this.UserEmailsController.add( this.req, { sendStatus: code => { code.should.equal(204) assertCalledWith( this.UserEmailsConfirmationHandler.promises.sendConfirmationEmail, this.user._id, this.newEmail ) done() }, }, this.next ) }) it('handles email parse error', function (done) { this.EmailHelper.parseEmail.returns(null) this.UserEmailsController.add( this.req, { sendStatus: code => { code.should.equal(422) assertNotCalled(this.UserUpdater.promises.addEmailAddress) done() }, }, this.next ) }) it('should pass the error to the next handler when adding the email fails', function (done) { this.UserUpdater.promises.addEmailAddress.rejects(new Error()) this.UserEmailsController.add(this.req, this.res, error => { expect(error).to.be.instanceof(Error) done() }) }) it('should call the HTTP conflict handler when the email already exists', function (done) { this.UserUpdater.promises.addEmailAddress.rejects( new Errors.EmailExistsError() ) this.HttpErrorHandler.conflict = sinon.spy((req, res, message) => { req.should.exist res.should.exist message.should.equal('email_already_registered') done() }) this.UserEmailsController.add(this.req, this.res, this.next) }) it("should call the HTTP conflict handler when there's a domain matching error", function (done) { this.UserUpdater.promises.addEmailAddress.rejects( new Error('422: Email does not belong to university') ) this.HttpErrorHandler.conflict = sinon.spy((req, res, message) => { req.should.exist res.should.exist message.should.equal('email_does_not_belong_to_university') done() }) this.UserEmailsController.add(this.req, this.res, this.next) }) }) describe('remove', function () { beforeEach(function () { this.email = 'email_to_remove@bar.com' this.req.body.email = this.email this.EmailHelper.parseEmail.returns(this.email) }) it('removes email', function (done) { this.UserUpdater.removeEmailAddress.callsArgWith(2, null) this.UserEmailsController.remove(this.req, { sendStatus: code => { code.should.equal(200) assertCalledWith(this.EmailHelper.parseEmail, this.email) assertCalledWith( this.UserUpdater.removeEmailAddress, this.user._id, this.email ) done() }, }) }) it('handles email parse error', function (done) { this.EmailHelper.parseEmail.returns(null) this.UserEmailsController.remove(this.req, { sendStatus: code => { code.should.equal(422) assertNotCalled(this.UserUpdater.removeEmailAddress) done() }, }) }) }) describe('setDefault', function () { beforeEach(function () { this.email = 'email_to_set_default@bar.com' this.req.body.email = this.email this.EmailHelper.parseEmail.returns(this.email) this.SessionManager.setInSessionUser.returns(null) }) it('sets default email', function (done) { this.UserUpdater.setDefaultEmailAddress.yields() this.UserEmailsController.setDefault(this.req, { sendStatus: code => { code.should.equal(200) assertCalledWith(this.EmailHelper.parseEmail, this.email) assertCalledWith( this.SessionManager.setInSessionUser, this.req.session, { email: this.email, } ) assertCalledWith( this.UserUpdater.setDefaultEmailAddress, this.user._id, this.email ) done() }, }) }) it('handles email parse error', function (done) { this.EmailHelper.parseEmail.returns(null) this.UserEmailsController.setDefault(this.req, { sendStatus: code => { code.should.equal(422) assertNotCalled(this.UserUpdater.setDefaultEmailAddress) done() }, }) }) it('should reset the users other sessions', function (done) { this.UserUpdater.setDefaultEmailAddress.yields() this.res.callback = () => { expect( this.UserSessionsManager.revokeAllUserSessions ).to.have.been.calledWith(this.user, [this.req.sessionID]) done() } this.UserEmailsController.setDefault(this.req, this.res, done) }) it('handles error from revoking sessions and returns 200', function (done) { this.UserUpdater.setDefaultEmailAddress.yields() const redisError = new Error('redis error') this.UserSessionsManager.revokeAllUserSessions = sinon .stub() .yields(redisError) this.res.callback = () => { expect(this.res.statusCode).to.equal(200) // give revoke process time to run setTimeout(() => { expect(this.logger.warn).to.have.been.calledWith( sinon.match({ err: redisError }), 'failed revoking secondary sessions after changing default email' ) done() }) } this.UserEmailsController.setDefault(this.req, this.res, done) }) }) describe('endorse', function () { beforeEach(function () { this.email = 'email_to_endorse@bar.com' this.req.body.email = this.email this.EmailHelper.parseEmail.returns(this.email) }) it('endorses affiliation', function (done) { this.req.body.role = 'Role' this.req.body.department = 'Department' this.UserEmailsController.endorse(this.req, { sendStatus: code => { code.should.equal(204) assertCalledWith( this.endorseAffiliation, this.user._id, this.email, 'Role', 'Department' ) done() }, }) }) }) describe('confirm', function () { beforeEach(function () { this.UserEmailsConfirmationHandler.confirmEmailFromToken = sinon .stub() .yields() this.res = { sendStatus: sinon.stub(), json: sinon.stub(), } this.res.status = sinon.stub().returns(this.res) this.next = sinon.stub() this.token = 'mock-token' this.req.body = { token: this.token } }) describe('successfully', function () { beforeEach(function () { this.UserEmailsController.confirm(this.req, this.res, this.next) }) it('should confirm the email from the token', function () { this.UserEmailsConfirmationHandler.confirmEmailFromToken .calledWith(this.token) .should.equal(true) }) it('should return a 200 status', function () { this.res.sendStatus.calledWith(200).should.equal(true) }) }) describe('without a token', function () { beforeEach(function () { this.req.body.token = null this.UserEmailsController.confirm(this.req, this.res, this.next) }) it('should return a 422 status', function () { this.res.status.calledWith(422).should.equal(true) }) }) describe('when confirming fails', function () { beforeEach(function () { this.UserEmailsConfirmationHandler.confirmEmailFromToken = sinon .stub() .yields(new Errors.NotFoundError('not found')) this.UserEmailsController.confirm(this.req, this.res, this.next) }) it('should return a 404 error code with a message', function () { this.res.status.calledWith(404).should.equal(true) this.res.json .calledWith({ message: this.req.i18n.translate('confirmation_token_invalid'), }) .should.equal(true) }) }) }) describe('resendConfirmation', function () { beforeEach(function () { this.EmailHelper.parseEmail.returnsArg(0) this.UserGetter.getUserByAnyEmail.yields(undefined, { _id: this.user._id, }) this.req = { body: {}, } this.res = { sendStatus: sinon.stub(), } this.next = sinon.stub() this.UserEmailsConfirmationHandler.sendConfirmationEmail = sinon .stub() .yields() }) it('should send the email', function (done) { this.req = { body: { email: 'test@example.com', }, } this.UserEmailsController.sendReconfirmation( this.req, this.res, this.next ) expect(this.UserEmailsConfirmationHandler.sendReconfirmationEmail).to.have .been.calledOnce done() }) it('should return 422 if email not valid', function (done) { this.req = { body: {}, } this.UserEmailsController.resendConfirmation( this.req, this.res, this.next ) expect(this.UserEmailsConfirmationHandler.sendConfirmationEmail).to.not .have.been.called expect(this.res.sendStatus.lastCall.args[0]).to.equal(422) done() }) describe('email on another user account', function () { beforeEach(function () { this.UserGetter.getUserByAnyEmail.yields(undefined, { _id: 'another-user-id', }) }) it('should return 422', function (done) { this.req = { body: { email: 'test@example.com', }, } this.UserEmailsController.resendConfirmation( this.req, this.res, this.next ) expect(this.UserEmailsConfirmationHandler.sendConfirmationEmail).to.not .have.been.called expect(this.res.sendStatus.lastCall.args[0]).to.equal(422) done() }) }) }) describe('sendReconfirmation', function () { beforeEach(function () { this.res.sendStatus = sinon.stub() this.UserGetter.getUserByAnyEmail.yields(undefined, { _id: this.user._id, }) this.EmailHelper.parseEmail.returnsArg(0) }) it('should send the email', function (done) { this.req = { body: { email: 'test@example.com', }, } this.UserEmailsController.sendReconfirmation( this.req, this.res, this.next ) expect(this.UserEmailsConfirmationHandler.sendReconfirmationEmail).to.have .been.calledOnce done() }) it('should return 400 if email not valid', function (done) { this.req = { body: {}, } this.UserEmailsController.sendReconfirmation( this.req, this.res, this.next ) expect(this.UserEmailsConfirmationHandler.sendReconfirmationEmail).to.not .have.been.called expect(this.res.sendStatus.lastCall.args[0]).to.equal(400) done() }) describe('email on another user account', function () { beforeEach(function () { this.UserGetter.getUserByAnyEmail.yields(undefined, { _id: 'another-user-id', }) }) it('should return 422', function (done) { this.req = { body: { email: 'test@example.com', }, } this.UserEmailsController.sendReconfirmation( this.req, this.res, this.next ) expect(this.UserEmailsConfirmationHandler.sendReconfirmationEmail).to .not.have.been.called expect(this.res.sendStatus.lastCall.args[0]).to.equal(422) done() }) }) }) })
overleaf/web/test/unit/src/User/UserEmailsControllerTests.js/0
{ "file_path": "overleaf/web/test/unit/src/User/UserEmailsControllerTests.js", "repo_id": "overleaf", "token_count": 7917 }
586
// TODO: This file was created by bulk-decaffeinate. // Sanity-check the conversion and remove this comment. /* * decaffeinate suggestions: * DS206: Consider reworking classes to avoid initClass * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ class MockRequest { static initClass() { this.prototype.session = { destroy() {} } this.prototype.ip = '42.42.42.42' this.prototype.headers = {} this.prototype.params = {} this.prototype.query = {} this.prototype.body = {} this.prototype._parsedUrl = {} this.prototype.i18n = { translate(str) { return str }, } this.prototype.route = { path: '' } this.prototype.accepts = () => {} this.prototype.setHeader = () => {} } param(param) { return this.params[param] } } MockRequest.initClass() module.exports = MockRequest
overleaf/web/test/unit/src/helpers/MockRequest.js/0
{ "file_path": "overleaf/web/test/unit/src/helpers/MockRequest.js", "repo_id": "overleaf", "token_count": 319 }
587
/* eslint-disable max-len, no-return-assign, no-unused-vars, */ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. /* * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ const sinon = require('sinon') const path = require('path') const modulePath = path.join( __dirname, '../../../../../app/src/infrastructure/LockManager.js' ) const SandboxedModule = require('sandboxed-module') describe('LockManager - trying the lock', function () { beforeEach(function () { this.LockManager = SandboxedModule.require(modulePath, { requires: { './RedisWrapper': { client: () => { return { auth() {}, set: (this.set = sinon.stub()), } }, }, '@overleaf/settings': { redis: {}, lockManager: { lockTestInterval: 50, maxTestInterval: 1000, maxLockWaitTime: 10000, redisLockExpiry: 30, slowExecutionThreshold: 5000, }, }, '@overleaf/metrics': { inc() {}, }, }, }) this.callback = sinon.stub() this.key = 'lock:web:lockName:project-id}' return (this.namespace = 'lockName') }) describe('when the lock is not set', function () { beforeEach(function () { this.set.callsArgWith(5, null, 'OK') this.LockManager.randomLock = sinon.stub().returns('random-lock-value') return this.LockManager._tryLock(this.key, this.namespace, this.callback) }) it('should set the lock key with an expiry if it is not set', function () { return this.set .calledWith(this.key, 'random-lock-value', 'EX', 30, 'NX') .should.equal(true) }) it('should return the callback with true', function () { return this.callback.calledWith(null, true).should.equal(true) }) }) describe('when the lock is already set', function () { beforeEach(function () { this.set.callsArgWith(5, null, null) return this.LockManager._tryLock(this.key, this.namespace, this.callback) }) it('should return the callback with false', function () { return this.callback.calledWith(null, false).should.equal(true) }) }) })
overleaf/web/test/unit/src/infrastructure/LockManager/tryLockTests.js/0
{ "file_path": "overleaf/web/test/unit/src/infrastructure/LockManager/tryLockTests.js", "repo_id": "overleaf", "token_count": 1007 }
588
root = true [*] insert_final_newline = true charset = utf-8 trim_trailing_whitespace = true end_of_line = lf [*.{js,json,vue,feature}] indent_style = space indent_size = 2 [*.{md,markdown}] trim_trailing_whitespace = false
owncloud/web/.editorconfig/0
{ "file_path": "owncloud/web/.editorconfig", "repo_id": "owncloud", "token_count": 100 }
589
Bugfix: Fix share indicators click to open the correct panel When clicking on a share indicator inside a file list row, the correct share panel will now be displayed. https://github.com/owncloud/web/issues/3324 https://github.com/owncloud/web/pull/3420
owncloud/web/changelog/0.10.0_2020-05-26/3324/0
{ "file_path": "owncloud/web/changelog/0.10.0_2020-05-26/3324", "repo_id": "owncloud", "token_count": 69 }
590
Change: Remove sidebar quickAccess We have removed the sidebar quickAccess extension point. To create an quick access to the sidebar, we need to use the quickActions extension point. https://github.com/owncloud/product/issues/80 https://github.com/owncloud/web/pull/3586
owncloud/web/changelog/0.11.0_2020-06-26/removed-sidebar-quick-access/0
{ "file_path": "owncloud/web/changelog/0.11.0_2020-06-26/removed-sidebar-quick-access", "repo_id": "owncloud", "token_count": 72 }
591
Change: Do not display outline when the files list is focused The files list was displaying outline when it received focus after a click. Since the focus is meant only programmatically, the outline was not supposed to be displayed. https://github.com/owncloud/web/issues/3747 https://github.com/owncloud/web/issues/3551 https://github.com/owncloud/web/pull/3752
owncloud/web/changelog/0.12.0_2020-07-10/files-list-outline/0
{ "file_path": "owncloud/web/changelog/0.12.0_2020-07-10/files-list-outline", "repo_id": "owncloud", "token_count": 97 }
592
Change: Large file downloads support with URL signing When the backend supports URL signing we now download with a signed url instead of downloading as BLOB. https://github.com/owncloud/web/pull/3797
owncloud/web/changelog/0.14.0_2020-08-17/url-signing.md/0
{ "file_path": "owncloud/web/changelog/0.14.0_2020-08-17/url-signing.md", "repo_id": "owncloud", "token_count": 49 }
593
Change: Shortened button label for creating public links The label of the button for creating public links in the links panel has been shortened to "Public link" instead of "Add public link" since the plus sign already implies adding. An Aria label has been added for clarification when using screen readers. https://github.com/owncloud/web/pull/4072 https://github.com/owncloud/web/issues/231
owncloud/web/changelog/0.17.0_2020-09-25/wording-create-public-link/0
{ "file_path": "owncloud/web/changelog/0.17.0_2020-09-25/wording-create-public-link", "repo_id": "owncloud", "token_count": 96 }
594
Enhancement: Display collaborators type We've added a new line into the collaborators autocomplete and list in the sidebar to display their type. https://github.com/owncloud/web/pull/4203
owncloud/web/changelog/0.24.0_2020-11-06/collaborator-type/0
{ "file_path": "owncloud/web/changelog/0.24.0_2020-11-06/collaborator-type", "repo_id": "owncloud", "token_count": 49 }
595
Change: Show dedicated 404 page for invalid resource references When visiting a public link or the `All files` page with an invalid resource in the URL (e.g. because it was deleted in the meantime) we now show a dedicated page which explains that the resource could not be found and offers a link to go back to the respective root (»All files« home location or the root of the public link). The breadcrumbs have been made available on invalid resources as well, so that those could be used for more precise navigation instead of jumping back to the root. https://github.com/owncloud/web/pull/4411
owncloud/web/changelog/0.28.0_2020-12-04/resource-not-found-error-page/0
{ "file_path": "owncloud/web/changelog/0.28.0_2020-12-04/resource-not-found-error-page", "repo_id": "owncloud", "token_count": 137 }
596
Bugfix: Fix collaborator selection on new collaborator shares When typing text into the search box for new collaborators, selecting a user and a group with identical names was not possible. This was due to the fact that when one (group or user) got selected, the other was excluded because of a matching name. Fixed by including the share type (group or user) in matching. https://github.com/owncloud/web/issues/1186
owncloud/web/changelog/0.4.0_2020-02-14/1186-2/0
{ "file_path": "owncloud/web/changelog/0.4.0_2020-02-14/1186-2", "repo_id": "owncloud", "token_count": 97 }
597
Bugfix: Fix accessible labels that said $gettext Fixed three accessible aria labels that were saying "$gettext" instead of their actual translated text. https://github.com/owncloud/web/pull/3039
owncloud/web/changelog/0.5.0_2020-03-02/3039/0
{ "file_path": "owncloud/web/changelog/0.5.0_2020-03-02/3039", "repo_id": "owncloud", "token_count": 51 }
598
Enhancement: Added thumbnails in file list Thumbnails are now displayed in the file list for known file types. When no thumbnail was returned, fall back to the file type icon. https://github.com/owncloud/web/issues/276 https://github.com/owncloud/web/pull/3187
owncloud/web/changelog/0.7.0_2020-03-30/276/0
{ "file_path": "owncloud/web/changelog/0.7.0_2020-03-30/276", "repo_id": "owncloud", "token_count": 74 }
599
Enhancement: Add chunked upload with tus-js-client Whenever the backend server advertises TUS support, uploading files will use TUS as well for uploading, which makes it possible to resume failed uploads. It is also possible to optionally set a chunk size by setting a numeric value for "uploadChunkSize" in bytes in config.json. https://github.com/owncloud/web/issues/67 https://github.com/owncloud/web/pull/3345
owncloud/web/changelog/0.9.0_2020-04-27/3345/0
{ "file_path": "owncloud/web/changelog/0.9.0_2020-04-27/3345", "repo_id": "owncloud", "token_count": 113 }
600
Enhancement: wait for all required data Before this we rendered the ui no matter if every required data already is loaded or not. For example the current users language from the ocis settings service. One potential problem was the flickering in the ui or that the default language was shown before it switches to the settings language of current user. Instead we now show a loading screen and wait for everything that is required before rendering anything else. https://github.com/owncloud/ocis/issues/884 https://github.com/owncloud/ocis/issues/1043
owncloud/web/changelog/1.0.0_2020-12-16/phoenix-ui-is-ready/0
{ "file_path": "owncloud/web/changelog/1.0.0_2020-12-16/phoenix-ui-is-ready", "repo_id": "owncloud", "token_count": 128 }
601
Bugfix: Remove unsupported shareType We don't support 'userGroup' (originally 'contact', shareType `2`) on the backend side anymore, so we delete it on the frontend, too. https://github.com/owncloud/web/pull/4809
owncloud/web/changelog/2.1.0_2021-03-24/bugfix-remove-unsupported-shareType/0
{ "file_path": "owncloud/web/changelog/2.1.0_2021-03-24/bugfix-remove-unsupported-shareType", "repo_id": "owncloud", "token_count": 64 }
602
Enhancement: Add "Shared via link" page We've added a new page called "Shared via link". This page displays a files list containing only resources shared via public links. https://github.com/owncloud/web/pull/4881
owncloud/web/changelog/3.0.0_2021-04-21/enhancement-split-shared-with-others/0
{ "file_path": "owncloud/web/changelog/3.0.0_2021-04-21/enhancement-split-shared-with-others", "repo_id": "owncloud", "token_count": 58 }
603
Bugfix: Correct navigation through "via"-tags The "shared via X" link in the indirect share tag in the sidebar was navigating to the parent directory of the indirect share entry. This has been fixed for the collaborators sidebar section and the link target is the share entry itself now. https://github.com/owncloud/web/pull/5122
owncloud/web/changelog/3.2.0_2021-05-31/bugfix-navigate-to-share-parent/0
{ "file_path": "owncloud/web/changelog/3.2.0_2021-05-31/bugfix-navigate-to-share-parent", "repo_id": "owncloud", "token_count": 83 }
604
Bugfix: Prevent scrolling issues In cases where the browser-window space was not enough to render all views the ui ended up with weird scrolling behavior. This has been fixed by restructuring the dom elements and giving them proper styles. https://github.com/owncloud/web/pull/5131
owncloud/web/changelog/3.3.0_2021-06-23/bugfix-scrolling-overflow/0
{ "file_path": "owncloud/web/changelog/3.3.0_2021-06-23/bugfix-scrolling-overflow", "repo_id": "owncloud", "token_count": 69 }
605
Enhancement: File editor mode We've added a parameter called `mode` to the different ways of opening a file editor. The mode can be `edit` or `create` and reflects whether the file editor was opened in an editing mode or in a creation mode. https://github.com/owncloud/web/issues/5226 https://github.com/owncloud/web/pull/5256
owncloud/web/changelog/3.3.0_2021-06-23/enhancement-editor-mode/0
{ "file_path": "owncloud/web/changelog/3.3.0_2021-06-23/enhancement-editor-mode", "repo_id": "owncloud", "token_count": 93 }
606
Enhancement: Use `oc-select` for role select We've used the new `oc-select` component from ODS for selecting role in people and public links accordions in the right sidebar. We are using this component to enable keyboard navigation when selecting the role. https://github.com/owncloud/web/pull/4937
owncloud/web/changelog/3.3.0_2021-06-23/enhancement-select-roles/0
{ "file_path": "owncloud/web/changelog/3.3.0_2021-06-23/enhancement-select-roles", "repo_id": "owncloud", "token_count": 76 }
607
Enhancement: Update Design System to 8.0.0 The ownCloud design system has been updated to its latest version. https://github.com/owncloud/owncloud-design-system/releases/tag/v8.0.0 https://github.com/owncloud/owncloud-design-system/releases/tag/v7.5.0 https://github.com/owncloud/web/pull/5465 https://github.com/owncloud/web/pull/5483 https://github.com/owncloud/web/pull/5408
owncloud/web/changelog/3.4.0_2021-07-09/enhancement-update-ods-8.0.0/0
{ "file_path": "owncloud/web/changelog/3.4.0_2021-07-09/enhancement-update-ods-8.0.0", "repo_id": "owncloud", "token_count": 134 }
608
Enhancement: Define the number of visible share recipients We've added a new configuration option `sharingRecipientsPerPage` to define how many recipients should be shown in the share recipients dropdown. https://github.com/owncloud/web/pull/5506
owncloud/web/changelog/4.0.0_2021-08-04/enhancement-share-recipients-number/0
{ "file_path": "owncloud/web/changelog/4.0.0_2021-08-04/enhancement-share-recipients-number", "repo_id": "owncloud", "token_count": 63 }
609
Enhancement: Re-design recipients role select We've redesigned recipient role select in the Files app sidebar. https://github.com/owncloud/web/pull/5632
owncloud/web/changelog/4.2.0_2021-09-14/enhancement-redesign-recipient-role-select/0
{ "file_path": "owncloud/web/changelog/4.2.0_2021-09-14/enhancement-redesign-recipient-role-select", "repo_id": "owncloud", "token_count": 41 }
610
Bugfix: Fix overlapping requests in files app In some cases the files app tended to display the wrong resources when navigating quickly through the views. This happened because the resource provisioning step wasn't canceled. This is now fixed by using vue-concurrency which on a high level wraps iterable generators which are cancelable. We're using it to wrap the resource loading and cancel it as soon as the resource set is not needed anymore. It also improves the overall performance for the files app. https://github.com/owncloud/web/pull/5917 https://github.com/owncloud/web/issues/5085 https://github.com/owncloud/web/issues/5875
owncloud/web/changelog/4.4.0_2021-10-26/bugfix-overlapping-view-requests/0
{ "file_path": "owncloud/web/changelog/4.4.0_2021-10-26/bugfix-overlapping-view-requests", "repo_id": "owncloud", "token_count": 154 }
611
Enhancement: Automatically show oC 10 apps in the app switcher menu When using the ownCloud 10 app of web the configuration automatically gets augmented with all menu items / apps from the classic UI. They open in a new tab in the classic UI and have a generic icon. https://github.com/owncloud/web/issues/5980 https://github.com/owncloud/web/pull/5996
owncloud/web/changelog/4.5.0_2021-11-16/enhancement-oc10-apps-in-app-switcher/0
{ "file_path": "owncloud/web/changelog/4.5.0_2021-11-16/enhancement-oc10-apps-in-app-switcher", "repo_id": "owncloud", "token_count": 94 }
612
Bugfix: Do not scroll on apps open in app provider Apps opened from the app provider were taking more than the window size, prompting the use of the scrollbar. https://github.com/owncloud/web/issues/5960 https://github.com/owncloud/web/pull/6003
owncloud/web/changelog/4.7.0_2021-12-16/bugfix-no-scroll-app-provider/0
{ "file_path": "owncloud/web/changelog/4.7.0_2021-12-16/bugfix-no-scroll-app-provider", "repo_id": "owncloud", "token_count": 70 }
613
Enhancement: Simplify people sharing sidebar We have reworked the people sharing sidebar to not be split into show/edit/create panels. The create form now is fixed to the top with the sharees list below and editing happening in-line. https://github.com/owncloud/web/pull/6039 https://github.com/owncloud/web/issues/5923 https://github.com/owncloud/web/issues/5608 https://github.com/owncloud/web/issues/5797
owncloud/web/changelog/4.8.0_2021-12-22/enhancement-simplify-people-sharing-sidebar/0
{ "file_path": "owncloud/web/changelog/4.8.0_2021-12-22/enhancement-simplify-people-sharing-sidebar", "repo_id": "owncloud", "token_count": 125 }
614
Enhancement: Add spaces actions We added the following actions to the spaces overview: * Create a new space * Rename a space * Delete a space https://github.com/owncloud/web/pull/6254 https://github.com/owncloud/web/issues/6255
owncloud/web/changelog/5.0.0_2022-02-14/enhancement-add-spaces-actions/0
{ "file_path": "owncloud/web/changelog/5.0.0_2022-02-14/enhancement-add-spaces-actions", "repo_id": "owncloud", "token_count": 71 }
615
Enhancement: Add default sorting to the spaces list Spaces will now be sorted by their name by default. https://github.com/owncloud/web/pull/6262 https://github.com/owncloud/web/issues/6253
owncloud/web/changelog/5.0.0_2022-02-14/enhancement-spaces-default-sorting/0
{ "file_path": "owncloud/web/changelog/5.0.0_2022-02-14/enhancement-spaces-default-sorting", "repo_id": "owncloud", "token_count": 59 }
616
Enhancement: Option to enable Vue history mode We've added the option to use vue's history mode. All configuration is done automatically by the system. To enable it, add a `<base href="PATH">` header tag to `index.html`, `oidc-callback.html` and `oidc-silent-redirect.html`. Adding `<base>` is not needed for ocis. https://github.com/owncloud/web/issues/6363 https://github.com/owncloud/web/issues/6277
owncloud/web/changelog/5.2.0_2022-03-03/enhancement-history-mode/0
{ "file_path": "owncloud/web/changelog/5.2.0_2022-03-03/enhancement-history-mode", "repo_id": "owncloud", "token_count": 128 }
617
Bugfix: Rename parent folder We fixed the rename option in the parent folder / breadcrumb context menu. It was broken due to malformed webdav paths. https://github.com/owncloud/web/issues/6516 https://github.com/owncloud/web/pull/6631
owncloud/web/changelog/5.3.0_2022-03-23/bugfix-rename-parent/0
{ "file_path": "owncloud/web/changelog/5.3.0_2022-03-23/bugfix-rename-parent", "repo_id": "owncloud", "token_count": 71 }
618
Enhancement: Move NoContentMessage component We've moved the NoContentMessage component into the web-pkg package to ease the use in other packages https://github.com/owncloud/web/pull/6643
owncloud/web/changelog/5.3.0_2022-03-23/enhancement-move-no-content-message-component/0
{ "file_path": "owncloud/web/changelog/5.3.0_2022-03-23/enhancement-move-no-content-message-component", "repo_id": "owncloud", "token_count": 50 }
619
Enhancement: Update the graph SDK We've updated the graph SDK to include the "me"-endpoint. https://github.com/owncloud/web/pull/6519
owncloud/web/changelog/5.3.0_2022-03-23/enhancement-update-graph-sdk/0
{ "file_path": "owncloud/web/changelog/5.3.0_2022-03-23/enhancement-update-graph-sdk", "repo_id": "owncloud", "token_count": 43 }
620
Enhancement: Audio support in preview app We've added support for audio file playback into the preview app (namely flac, mp3, wav and ogg). https://github.com/owncloud/web/pull/6514
owncloud/web/changelog/5.4.0_2022-04-11/enhancement-preview-audio-support/0
{ "file_path": "owncloud/web/changelog/5.4.0_2022-04-11/enhancement-preview-audio-support", "repo_id": "owncloud", "token_count": 56 }
621
Bugfix: We added the shares item to the breadcrumbs at the shared with me page https://github.com/owncloud/web/pull/6965 https://github.com/owncloud/web/issues/6937
owncloud/web/changelog/5.5.0_2022-06-20/bugfix-add-root-breadcrumb-to-shared-with-me-page/0
{ "file_path": "owncloud/web/changelog/5.5.0_2022-06-20/bugfix-add-root-breadcrumb-to-shared-with-me-page", "repo_id": "owncloud", "token_count": 53 }
622
Bugfix: Rename a file in favorites list with same name but in different folder We've fixed a bug, where renaming a file in the favorites file list to a file with the same name but located in a different folder was not possible, as the message `The name "..." is already taken` appeared. https://github.com/owncloud/web/pull/6804 https://github.com/owncloud/web/issues/1750
owncloud/web/changelog/5.5.0_2022-06-20/bugfix-renaming-favorites-issue/0
{ "file_path": "owncloud/web/changelog/5.5.0_2022-06-20/bugfix-renaming-favorites-issue", "repo_id": "owncloud", "token_count": 101 }
623
Bugfix: Spaces Contextmenu trigger id isn't valid We've fixed a bug which resulted in spaces having an invalid trigger id for the contextmenu. https://github.com/owncloud/web/issues/6845 https://github.com/owncloud/web/pull/6848
owncloud/web/changelog/5.5.0_2022-06-20/bugfix-spaces-triggerid-invalid/0
{ "file_path": "owncloud/web/changelog/5.5.0_2022-06-20/bugfix-spaces-triggerid-invalid", "repo_id": "owncloud", "token_count": 67 }
624
Enhancement: Consistent dropdown menus Made the main dropdown menus (new, upload, context, etc) constistent in size, hover effect and spacing/margins. https://github.com/owncloud/web/issues/6555 https://github.com/owncloud/web/pull/6762
owncloud/web/changelog/5.5.0_2022-06-20/enhancement-consistend-dropdows/0
{ "file_path": "owncloud/web/changelog/5.5.0_2022-06-20/enhancement-consistend-dropdows", "repo_id": "owncloud", "token_count": 73 }
625
Enhancement: Customize additional mimeTypes for preview app We've added support for customizing additional mimeTypes for the preview app. In case the backend supports more mimeTypes than our hardcoded list in the preview app, you can now announce them to ownCloud Web with additional config. See https://owncloud.dev/clients/web/deployments/oc10-app/#additional-configuration-for-certain-core-apps https://github.com/owncloud/web/issues/6933 https://github.com/owncloud/web/pull/7131
owncloud/web/changelog/5.5.0_2022-06-20/enhancement-preview-additional-mimetypes/0
{ "file_path": "owncloud/web/changelog/5.5.0_2022-06-20/enhancement-preview-additional-mimetypes", "repo_id": "owncloud", "token_count": 132 }
626
Enhancement: Update SDK We've updated the ownCloud SDK to version 3.0.0-alpha.10. - Change - Pass full trash bin path to methods of FilesTrash class: https://github.com/owncloud/owncloud-sdk/pull/1021 - Enhancement - Enforce share_type guest if applies: https://github.com/owncloud/owncloud-sdk/pull/1046 - Enhancement - Create quicklink: https://github.com/owncloud/owncloud-sdk/pull/1041 - Enhancement - Replace deprecated String.prototype.substr(): https://github.com/owncloud/owncloud-sdk/pull/1035 - Enhancement - Add blob resolveType: https://github.com/owncloud/owncloud-sdk/pull/1028 - Enhancement - Adjust share management to properly work with spaces: https://github.com/owncloud/owncloud-sdk/pull/1013 - Enhancement - Send oc-etag on putFileContents and getFileContents methods: https://github.com/owncloud/owncloud-sdk/pull/1067 - Enhancement - Enable search results for ocis: https://github.com/owncloud/owncloud-sdk/pull/1057 - Enhancement - Add overwrite flag for file move: https://github.com/owncloud/owncloud-sdk/pull/1073 - Bugfix - Always add X-Request-ID: https://github.com/owncloud/owncloud-sdk/pull/1016 - Bugfix - Always add X-Requested-With header: https://github.com/owncloud/owncloud-sdk/pull/1020 https://github.com/owncloud/web/pull/6820 https://github.com/owncloud/web/pull/6952 https://github.com/owncloud/web/pull/6994 https://github.com/owncloud/owncloud-sdk/releases/tag/v3.0.0-alpha.10
owncloud/web/changelog/5.5.0_2022-06-20/enhancement-update-sdk/0
{ "file_path": "owncloud/web/changelog/5.5.0_2022-06-20/enhancement-update-sdk", "repo_id": "owncloud", "token_count": 461 }
627
Bugfix: Decline share not possible We've fixed a bug where declining an accepted share in the dropdown next to the breadcrumb was not possible. https://github.com/owncloud/web/pull/7379 https://github.com/owncloud/web/issues/6899
owncloud/web/changelog/5.7.0_2022-09-09/bugfix-decline-share-not-possible/0
{ "file_path": "owncloud/web/changelog/5.7.0_2022-09-09/bugfix-decline-share-not-possible", "repo_id": "owncloud", "token_count": 68 }
628
Bugfix: Left sidebar when switching apps We've fixed a bug where the active state of the left sidebar would glitch visually when switching apps. https://github.com/owncloud/web/issues/7526 https://github.com/owncloud/web/pull/7529
owncloud/web/changelog/5.7.0_2022-09-09/bugfix-left-sidebar-app-switch/0
{ "file_path": "owncloud/web/changelog/5.7.0_2022-09-09/bugfix-left-sidebar-app-switch", "repo_id": "owncloud", "token_count": 64 }
629
Bugfix: Fix infinite loading spinner on invalid preview links The `preview` app now shows an error, when a file does not exist (for example when opening a bookmark to a file that does not exist anymore). Before it showed a loading spinner infinitely. https://github.com/owncloud/web/pull/7359
owncloud/web/changelog/5.7.0_2022-09-09/bugfix-preview-infinite-loading-spinner/0
{ "file_path": "owncloud/web/changelog/5.7.0_2022-09-09/bugfix-preview-infinite-loading-spinner", "repo_id": "owncloud", "token_count": 74 }
630
Bugfix: Hide share actions for space viewers/editors We've fixed a bug where viewers and editors of a space could see the actions to edit and remove shares. We've also improved the error handling when something goes wrong while editing/removing shares. https://github.com/owncloud/web/issues/7436 https://github.com/owncloud/web/pull/7470
owncloud/web/changelog/5.7.0_2022-09-09/bugfix-space-share-actions/0
{ "file_path": "owncloud/web/changelog/5.7.0_2022-09-09/bugfix-space-share-actions", "repo_id": "owncloud", "token_count": 88 }
631
Enhancement: Add Keyboard navigation/selection We've added the possibility to navigate and select via keyboard. - Navigation: - via keyboard arrows up/down for moving up and down through the rows of the file list - Selection - via keyboard space bar: select / deselect the currently highlighted row - via keyboard shift + arrows up/down: add a series of rows - via keyboard cmd/ctrl + a: select all rows - via keyboard esc: deselect all rows - via mouse holding cmd/ctrl + left click on a row: add/remove the clicked item to/from the current selection model - via mouse holding shift + left click on a row: add the clicked row and the series of rows towards the most recently clicked row to the current selection model. https://github.com/owncloud/web/pull/7153 https://github.com/owncloud/web/issues/6029 https://github.com/owncloud/web/pull/7280 https://github.com/owncloud/web/pull/7283
owncloud/web/changelog/5.7.0_2022-09-09/enhancement-add-keyboard-navigation-selection/0
{ "file_path": "owncloud/web/changelog/5.7.0_2022-09-09/enhancement-add-keyboard-navigation-selection", "repo_id": "owncloud", "token_count": 252 }
632
Enhancement: Reduce pagination options We've reduced the pagination options by removing the options to display 1000 and all files. These may be added again later after further improving the files table performance. https://github.com/owncloud/web/issues/7038 https://github.com/owncloud/web/pull/7597
owncloud/web/changelog/5.7.0_2022-09-09/enhancement-reduce-pagination-options/0
{ "file_path": "owncloud/web/changelog/5.7.0_2022-09-09/enhancement-reduce-pagination-options", "repo_id": "owncloud", "token_count": 76 }
633
Enhancement: Update ODS to v14.0.0-alpha.18 We updated the ownCloud Design System to version 14.0.0-alpha.18. Please refer to the full changelog in the ODS release (linked) for more details. Summary: * Bugfix - Omit special characters in user avatar initials: [#2070](https://github.com/owncloud/owncloud-design-system/issues/2070) * Bugfix - Avatar link icon: [#2269](https://github.com/owncloud/owncloud-design-system/pull/2269) * Bugfix - Firefox drag & drop move of folders not possible: [#7495](https://github.com/owncloud/web/issues/7495) * Bugfix - Lazy loading render performance: [#2260](https://github.com/owncloud/owncloud-design-system/pull/2260) * Bugfix - Remove width shrinking of the ocAvatarItem: [#2241](https://github.com/owncloud/owncloud-design-system/issues/2241) * Bugfix - Remove click event on OcIcon: [#2216](https://github.com/owncloud/owncloud-design-system/pull/2216) * Change - Redesign contextual helper: [#2271](https://github.com/owncloud/owncloud-design-system/pull/2271) * Change - Remove OcAlert component: [#2210](https://github.com/owncloud/owncloud-design-system/pull/2210) * Change - Remove transition animations: [#2210](https://github.com/owncloud/owncloud-design-system/pull/2210) * Change - Revamp animations: [#2210](https://github.com/owncloud/owncloud-design-system/pull/2210) * Change - OcTable emit event data on row click: [#2218](https://github.com/owncloud/owncloud-design-system/pull/2218) * Enhancement - Add nestedd drop functionality: [#2238](https://github.com/owncloud/owncloud-design-system/issues/2238) * Enhancement - Add OcInfoDrop: [#2286](https://github.com/owncloud/owncloud-design-system/pull/2286) * Enhancement - Add rounded prop to OcTag: [#2284](https://github.com/owncloud/owncloud-design-system/pull/2284) * Enhancement - Adjust avatar font weight from bold to normal: [#2275](https://github.com/owncloud/owncloud-design-system/pull/2275) * Enhancement - Align breadcrumb context menu with regular context menu: [#2296](https://github.com/owncloud/owncloud-design-system/pull/2296) * Enhancement - OcCheckbox add outline: [#2218](https://github.com/owncloud/owncloud-design-system/pull/2218) * Enhancement - Add offset property to the drop component: [#7335](https://github.com/owncloud/web/issues/7335) * Enhancement - Make UI smaller: [#2270](https://github.com/owncloud/owncloud-design-system/pull/2270) * Enhancement - Oc-card style: [#2306](https://github.com/owncloud/owncloud-design-system/pull/2306) * Enhancement - OcSelect dark mode improvements: [#2262](https://github.com/owncloud/owncloud-design-system/pull/2262) * Enhancement - Progress bar indeterminate state: [#2200](https://github.com/owncloud/owncloud-design-system/pull/2200) * Enhancement - Redesign notifications: [#2210](https://github.com/owncloud/owncloud-design-system/pull/2210) * Enhancement - Use Inter font: [#2270](https://github.com/owncloud/owncloud-design-system/pull/2270) https://github.com/owncloud/web/pull/7626 https://github.com/owncloud/owncloud-design-system/releases/tag/v14.0.0-alpha.18
owncloud/web/changelog/5.7.0_2022-09-09/enhancement-update-ods/0
{ "file_path": "owncloud/web/changelog/5.7.0_2022-09-09/enhancement-update-ods", "repo_id": "owncloud", "token_count": 993 }
634
Bugfix: File name reactivity We've fixed a bug where the file name would not update reactively in the sidebar after changing it. https://github.com/owncloud/web/pull/7734 https://github.com/owncloud/web/issues/7713
owncloud/web/changelog/6.0.0_2022-11-29/bugfix-file-name-reactivity/0
{ "file_path": "owncloud/web/changelog/6.0.0_2022-11-29/bugfix-file-name-reactivity", "repo_id": "owncloud", "token_count": 64 }
635
Bugfix: Reload file list after last share removal We've fixed a bug where the file list would not update after removing the last share or link. Also, we now prevent the shares tree from being loaded again if the removed share was not the last one. https://github.com/owncloud/web/pull/7748
owncloud/web/changelog/6.0.0_2022-11-29/bugfix-reload-file-list-after-share-removal/0
{ "file_path": "owncloud/web/changelog/6.0.0_2022-11-29/bugfix-reload-file-list-after-share-removal", "repo_id": "owncloud", "token_count": 72 }
636
Bugfix: Saving a file multiple times with the text editor An issue with saving a file multiple times via text editor has been fixed. https://github.com/owncloud/web/pull/8030 https://github.com/owncloud/web/issues/8029
owncloud/web/changelog/6.0.0_2022-11-29/bugfix-text-editor-multple-save/0
{ "file_path": "owncloud/web/changelog/6.0.0_2022-11-29/bugfix-text-editor-multple-save", "repo_id": "owncloud", "token_count": 63 }
637
Enhancement: Design polishing We've polished the overall design, especially spacings and the spaces-views. https://github.com/owncloud/web/pull/7684 https://github.com/owncloud/web/issues/6705 https://github.com/owncloud/web/issues/7676 https://github.com/owncloud/web/issues/7525 https://github.com/owncloud/web/issues/7693 https://github.com/owncloud/web/issues/7694 https://github.com/owncloud/web/issues/7685 https://github.com/owncloud/web/issues/7693 https://github.com/owncloud/web/issues/7773
owncloud/web/changelog/6.0.0_2022-11-29/enhancement-design-polishing/0
{ "file_path": "owncloud/web/changelog/6.0.0_2022-11-29/enhancement-design-polishing", "repo_id": "owncloud", "token_count": 171 }
638
Enhancement: XHR upload timeout The default timeout for XHR uploads has been increased from 30 to 60 seconds. Also, it can now be configured via the `config.json` file (in ms). https://github.com/owncloud/web/issues/7900 https://github.com/owncloud/web/pull/7912
owncloud/web/changelog/6.0.0_2022-11-29/enhancement-xhr-timeout/0
{ "file_path": "owncloud/web/changelog/6.0.0_2022-11-29/enhancement-xhr-timeout", "repo_id": "owncloud", "token_count": 80 }
639
Bugfix: Prevent "virtual" spaces from being displayed in the UI While ownCloud Web is capable of displaying any type of spaces we found out that it is not valid to display so called "virtual" spaces. In such a case users now get redirected to their default location (personal space for users, project spaces overview for guests). https://github.com/owncloud/web/pull/9015
owncloud/web/changelog/7.0.0_2023-06-02/bugfix-forbid-virtual-shares/0
{ "file_path": "owncloud/web/changelog/7.0.0_2023-06-02/bugfix-forbid-virtual-shares", "repo_id": "owncloud", "token_count": 88 }
640
Bugfix: Pagination after increasing items per page An issue where the file list incorrectly showed no items after paginating and increasing the amount of items per page has been fixed. https://github.com/owncloud/web/issues/6768 https://github.com/owncloud/web/pull/8854
owncloud/web/changelog/7.0.0_2023-06-02/bugfix-pagination-after-increasing-items-per-page/0
{ "file_path": "owncloud/web/changelog/7.0.0_2023-06-02/bugfix-pagination-after-increasing-items-per-page", "repo_id": "owncloud", "token_count": 71 }
641
Bugfix: Search bar input appearance The broken appearance of the search bar input field has been fixed. https://github.com/owncloud/web/issues/8158 https://github.com/owncloud/web/pull/8203
owncloud/web/changelog/7.0.0_2023-06-02/bugfix-search-bar-input-appearance/0
{ "file_path": "owncloud/web/changelog/7.0.0_2023-06-02/bugfix-search-bar-input-appearance", "repo_id": "owncloud", "token_count": 56 }
642
Bugfix: UI fixes for sorting and quickactions Ensure the sorting of "shared with" in "shared with me" view is correct when they have been shared simultaneously with users and groups. Prevent the context actions to disappear when `hoverableQuickActions` is set to true. https://github.com/owncloud/web/pull/7966
owncloud/web/changelog/7.0.0_2023-06-02/bugfix-ui-sorting-quickactions/0
{ "file_path": "owncloud/web/changelog/7.0.0_2023-06-02/bugfix-ui-sorting-quickactions", "repo_id": "owncloud", "token_count": 80 }
643
Enhancement: Add support for read-only groups Read-only groups are now supported. Such groups can't be edited or assigned to/removed from users. They are indicated via a lock icon in the group list and all affected inputs. https://github.com/owncloud/web/pull/8766 https://github.com/owncloud/web/issues/8729
owncloud/web/changelog/7.0.0_2023-06-02/enhancement-add-support-for-read-only-groups/0
{ "file_path": "owncloud/web/changelog/7.0.0_2023-06-02/enhancement-add-support-for-read-only-groups", "repo_id": "owncloud", "token_count": 86 }
644
Enhancement: Conflict dialog UX The UX of the conflict dialog has been improved slightly: * The name of the conflicting resource is now written in quotes * The title of the dialog now tells the difference between files and folders * The "Skip"-dialog now tells the difference between files and folders https://github.com/owncloud/web/pull/7983 https://github.com/owncloud/web/issues/7682
owncloud/web/changelog/7.0.0_2023-06-02/enhancement-conflict-dialog-ux/0
{ "file_path": "owncloud/web/changelog/7.0.0_2023-06-02/enhancement-conflict-dialog-ux", "repo_id": "owncloud", "token_count": 99 }
645
Enhancement: Introduce trashbin overview We've added a trashbin overview page, where the user can see their personal trashbins but also the trashbin of the spaces they are a member of. https://github.com/owncloud/web/pull/8515 https://github.com/owncloud/web/issues/8517
owncloud/web/changelog/7.0.0_2023-06-02/enhancement-introduce-trashbin-overview/0
{ "file_path": "owncloud/web/changelog/7.0.0_2023-06-02/enhancement-introduce-trashbin-overview", "repo_id": "owncloud", "token_count": 79 }
646
Enhancement: QuickActions role configurable We've added the option to change the default quickactions role via capabilities. https://github.com/owncloud/web/pull/8566 https://github.com/owncloud/web/issues/8547
owncloud/web/changelog/7.0.0_2023-06-02/enhancement-quickactions-configurable-capabilities/0
{ "file_path": "owncloud/web/changelog/7.0.0_2023-06-02/enhancement-quickactions-configurable-capabilities", "repo_id": "owncloud", "token_count": 60 }
647
Enhancement: Skeleton App The skeleton app has been part of the project for a long time, but with the conversion to vite it has since been ignored and no longer transpiled. Due to the change, the app is now taken into account again, but must be explicitly enabled. For this please see the associated APP README. Also new is a search example that is now included and uses GitHub to show how a custom search provider can be developed. https://github.com/owncloud/web/pull/8441
owncloud/web/changelog/7.0.0_2023-06-02/enhancement-skeleton-app/0
{ "file_path": "owncloud/web/changelog/7.0.0_2023-06-02/enhancement-skeleton-app", "repo_id": "owncloud", "token_count": 117 }
648
Bugfix: Experimental app loading We've made a change to make our helper package "web-pkg" available in our (still experimental) extension system. https://github.com/owncloud/web/pull/9212
owncloud/web/changelog/7.0.2_2023-06-14/bugfix-app-loading/0
{ "file_path": "owncloud/web/changelog/7.0.2_2023-06-14/bugfix-app-loading", "repo_id": "owncloud", "token_count": 51 }
649
Enhancement: Add login button to top bar We've added a login button to the top bar, this might be handy if a user receives a public link, and they want to login with their user account. https://github.com/owncloud/web/pull/9178 https://github.com/owncloud/web/pull/9187 https://github.com/owncloud/web/issues/9177
owncloud/web/changelog/7.1.0_2023-08-23/enhancement-add-login-button-to-top-bar/0
{ "file_path": "owncloud/web/changelog/7.1.0_2023-08-23/enhancement-add-login-button-to-top-bar", "repo_id": "owncloud", "token_count": 96 }
650
Enhancement: User notification for blocked pop-ups and redirects We have added some functionality that reminds the user to check their browser settings so that redirects and e.g. opening a resource in a new tab can work properly. https://github.com/owncloud/web/issues/9377 https://github.com/owncloud/web/pull/9383 https://github.com/owncloud/web/pull/9419
owncloud/web/changelog/7.1.0_2023-08-23/enhancement-pop-up-redirect-blocker-notification/0
{ "file_path": "owncloud/web/changelog/7.1.0_2023-08-23/enhancement-pop-up-redirect-blocker-notification", "repo_id": "owncloud", "token_count": 101 }
651
Enhancement: Upload file on paste We've implemented the possibility to upload a single file in the clipboard from anywhere via paste. https://github.com/owncloud/web/pull/9140 https://github.com/owncloud/web/issues/9047
owncloud/web/changelog/7.1.0_2023-08-23/enhancement-upload-file-on-paste/0
{ "file_path": "owncloud/web/changelog/7.1.0_2023-08-23/enhancement-upload-file-on-paste", "repo_id": "owncloud", "token_count": 62 }
652
Bugfix: Filter out shares without display name In rare (legacy) cases, shares can exist without a displayName key, which caused trouble in the sharing sidebar section. This has been addressed by filtering out shares without a displayName. https://github.com/owncloud/web/issues/9257 https://github.com/owncloud/web/pull/9504
owncloud/web/changelog/8.0.0_2024-03-08/bugfix-filter-shares-without-displayname/0
{ "file_path": "owncloud/web/changelog/8.0.0_2024-03-08/bugfix-filter-shares-without-displayname", "repo_id": "owncloud", "token_count": 85 }
653
Bugfix: Resolving links without drive alias Resolving links without a drive alias has been fixed in case a fileId is given via query param. https://github.com/owncloud/web/pull/10154 https://github.com/owncloud/web/issues/9269
owncloud/web/changelog/8.0.0_2024-03-08/bugfix-resolve-link-without-drive-alias/0
{ "file_path": "owncloud/web/changelog/8.0.0_2024-03-08/bugfix-resolve-link-without-drive-alias", "repo_id": "owncloud", "token_count": 66 }
654
Bugfix: Copy quicklinks for webkit navigator Copying quicklinks didn't work on safari or other webkit based browsers and is fixed now. https://github.com/owncloud/web/pull/9832 https://github.com/owncloud/web/issues/9166
owncloud/web/changelog/8.0.0_2024-03-08/bugfix-webkit-copy-quicklinks/0
{ "file_path": "owncloud/web/changelog/8.0.0_2024-03-08/bugfix-webkit-copy-quicklinks", "repo_id": "owncloud", "token_count": 68 }
655
Enhancement: Application unification The existing apps have been refactored and their common functionality has been extracted. This enables developers to more easily create custom apps, and brings unified behavior like auto-saving, shortcut handling and success/error messages across all file viewer/editor apps. https://github.com/owncloud/web/issues/9302 https://github.com/owncloud/web/issues/9303 https://github.com/owncloud/web/issues/9617 https://github.com/owncloud/web/issues/9695 https://github.com/owncloud/web/pull/9485 https://github.com/owncloud/web/pull/9699
owncloud/web/changelog/8.0.0_2024-03-08/enhancement-app-templates/0
{ "file_path": "owncloud/web/changelog/8.0.0_2024-03-08/enhancement-app-templates", "repo_id": "owncloud", "token_count": 157 }
656
Enhancement: Display error message for upload to locked folder Added error message to indicate that the upload failed due to folder being locked. https://github.com/owncloud/web/pull/9940 https://github.com/owncloud/web/issues/5741
owncloud/web/changelog/8.0.0_2024-03-08/enhancement-folder-locked-error-message/0
{ "file_path": "owncloud/web/changelog/8.0.0_2024-03-08/enhancement-folder-locked-error-message", "repo_id": "owncloud", "token_count": 63 }
657
Enhancement: Scroll to newly created folder After creating a new folder that gets sorted into the currently displayed resources but outside of the current viewport, we now scroll to the new folder. https://github.com/owncloud/web/issues/7600 https://github.com/owncloud/web/issues/7601 https://github.com/owncloud/web/pulls/8145
owncloud/web/changelog/8.0.0_2024-03-08/enhancement-scroll-to-created-folder/0
{ "file_path": "owncloud/web/changelog/8.0.0_2024-03-08/enhancement-scroll-to-created-folder", "repo_id": "owncloud", "token_count": 90 }
658
Enhancement: Upload preparation time The performance of the preparation time before each upload has been improved. https://github.com/owncloud/web/pull/9552 https://github.com/owncloud/web/issues/9817
owncloud/web/changelog/8.0.0_2024-03-08/enhancement-upload-preparation-time/0
{ "file_path": "owncloud/web/changelog/8.0.0_2024-03-08/enhancement-upload-preparation-time", "repo_id": "owncloud", "token_count": 56 }
659
Change: Remove homeFolder option We have removed the `homeFolder` option as it was originally implemented and used by CERN but isn't needed anymore. https://github.com/owncloud/web/pull/10122
owncloud/web/changelog/9.0.0_2024-02-26/change-remove-home-folder-option/0
{ "file_path": "owncloud/web/changelog/9.0.0_2024-02-26/change-remove-home-folder-option", "repo_id": "owncloud", "token_count": 51 }
660
Enhancement: Integrate ToastUI editor in the text editor app We've integrated the ToastUI editor in our text editor app. This makes writing markdown much easier, since the users will have access to a markdown compatible toolbar. Code syntax highlighting is also supported. https://github.com/owncloud/web/pull/10390 https://github.com/owncloud/web/pull/10467 https://github.com/owncloud/web/pull/10465 https://github.com/owncloud/web/issues/9495 https://github.com/owncloud/web/issues/10385
owncloud/web/changelog/9.0.0_2024-02-26/enhancement-text-editor-intergrate-toast-ui-editor/0
{ "file_path": "owncloud/web/changelog/9.0.0_2024-02-26/enhancement-text-editor-intergrate-toast-ui-editor", "repo_id": "owncloud", "token_count": 141 }
661
#!/bin/sh set -e apk add curl #TODO: app driver itself should try again until OnlyOffice is up... retries=10 while [[ $retries -gt 0 ]]; do if curl --silent --show-error --fail http://onlyoffice/hosting/discovery > /dev/null; then ocis app-provider server else echo "OnlyOffice is not yet available, trying again in 10 seconds" sleep 10 retries=$((retries - 1)) fi done echo 'OnlyOffice was not available after 100 seconds' exit 1
owncloud/web/deployments/examples/ocis_web/config/ocis-appprovider-onlyoffice/entrypoint-override.sh/0
{ "file_path": "owncloud/web/deployments/examples/ocis_web/config/ocis-appprovider-onlyoffice/entrypoint-override.sh", "repo_id": "owncloud", "token_count": 178 }
662
--- title: 'Development' date: 2022-01-28T00:00:00+00:00 weight: 50 geekdocRepo: https://github.com/owncloud/web geekdocEditPath: edit/master/docs/development geekdocFilePath: _index.md geekdocCollapseSection: true --- {{< toc >}} This section is a guide about the development of ownCloud Web **core**, **apps** and **extensions**. This includes **tooling**, **conventions** and the **repo structure**. It is of interest for you if you want to contribute to ownCloud Web or develop your own apps and extensions.
owncloud/web/docs/development/_index.md/0
{ "file_path": "owncloud/web/docs/development/_index.md", "repo_id": "owncloud", "token_count": 163 }
663
const StyleDictionary = require('style-dictionary') const path = require('path') const yaml = require('yaml') StyleDictionary.registerFormat(require('./build-tokens/format-writer-json')) StyleDictionary.registerFormat(require('./build-tokens/format-writer-scss')) StyleDictionary.registerTransform(require('./build-tokens/transform-namespace')) StyleDictionary.extend({ parsers: [ { pattern: /\.yaml$/, parse: ({ contents, filePath }) => { // This is a bit of a hack to prevent name collisions which would drop the tokens then if (filePath.split('/').some((n) => n === 'docs')) { const parsed = yaml.parse(contents) Object.keys(parsed).forEach((k) => { parsed['docs-' + k] = parsed[k] delete parsed[k] }) return parsed } return yaml.parse(contents) } } ], source: [path.join(__dirname, '../src/tokens/**/*.yaml')], platforms: { ods: { transforms: ['name/cti/kebab', 'transform/ods/namespace'], buildPath: 'src/assets/tokens/', files: [ { destination: 'ods.scss', format: 'format/ods/scss', filter: ({ filePath }) => filePath.includes('/ods/') }, { destination: 'ods.json', format: 'format/ods/json', filter: ({ filePath }) => filePath.includes('/ods/') }, { destination: 'docs.scss', format: 'format/ods/scss', filter: ({ filePath }) => filePath.includes('/docs/') } ] } } }).buildAllPlatforms()
owncloud/web/packages/design-system/build/build-tokens.js/0
{ "file_path": "owncloud/web/packages/design-system/build/build-tokens.js", "repo_id": "owncloud", "token_count": 725 }
664
Enhancement: Added iconUrl to oc-file element The oc-file element now supports passing an arbitrary URL to be displayed as a file thumbnail. It will fall back to the icon name in case the thumbnail could not be loaded. https://github.com/owncloud/owncloud-design-system/pull/678
owncloud/web/packages/design-system/changelog/1.1.0_2020-03-17/678/0
{ "file_path": "owncloud/web/packages/design-system/changelog/1.1.0_2020-03-17/678", "repo_id": "owncloud", "token_count": 75 }
665
Change: Add flat style for oc-loader The oc-loader component now has a `flat` style, which removes the border radius and shrinks the height. It can be enabled by setting the `flat` property on the component to `true`. With this the visual appearance of the loader is less prominent. https://github.com/owncloud/owncloud-design-system/pull/884
owncloud/web/packages/design-system/changelog/1.12.0_2020-10-03/flat-loader/0
{ "file_path": "owncloud/web/packages/design-system/changelog/1.12.0_2020-10-03/flat-loader", "repo_id": "owncloud", "token_count": 91 }
666
Enhancement: Bind attributes and events to input in oc-text-input We've binded attributes and events to input in oc-text-input so that they are passed properly instead of passing them to the root element. https://github.com/owncloud/owncloud-design-system/pull/706
owncloud/web/packages/design-system/changelog/1.2.1_2020-04-07/706-2/0
{ "file_path": "owncloud/web/packages/design-system/changelog/1.2.1_2020-04-07/706-2", "repo_id": "owncloud", "token_count": 71 }
667
Enhancement: Increase the logo clearspace We've increased the gutter between top corner of the sidebar and the logo. We've also decreased the size of the logo itself. https://github.com/owncloud/owncloud-design-system/issues/786 https://github.com/owncloud/owncloud-design-system/pull/791
owncloud/web/packages/design-system/changelog/1.7.0_2020-06-17/logo-clearspace/0
{ "file_path": "owncloud/web/packages/design-system/changelog/1.7.0_2020-06-17/logo-clearspace", "repo_id": "owncloud", "token_count": 81 }
668
Bugfix: Prevent hover style on footer of <oc-table> https://github.com/owncloud/owncloud-design-system/pull/1667
owncloud/web/packages/design-system/changelog/11.0.0_2021-10-04/bugfix-prevent-hover-style-on-oc-table-footer/0
{ "file_path": "owncloud/web/packages/design-system/changelog/11.0.0_2021-10-04/bugfix-prevent-hover-style-on-oc-table-footer", "repo_id": "owncloud", "token_count": 38 }
669
Bugfix: Set language for date formatting We're now setting the language when formatting dates, so that localized parts of the date/time get shown according to the respective language. https://github.com/owncloud/owncloud-design-system/pull/1806
owncloud/web/packages/design-system/changelog/11.3.0_2021-12-03/bugfix-language-formatted-dates/0
{ "file_path": "owncloud/web/packages/design-system/changelog/11.3.0_2021-12-03/bugfix-language-formatted-dates", "repo_id": "owncloud", "token_count": 60 }
670
Change: Remove oc-table-files from ods ods oc-table-files always contained concrete web-app-files logic, to make development more agile and keep things close oc-table-files was removed from ODS and relocated to live in web-app-files from now on. https://github.com/owncloud/owncloud-design-system/pull/1817 https://github.com/owncloud/web/pull/6106
owncloud/web/packages/design-system/changelog/12.0.0_2022-02-07/change-remove-oc-table-files/0
{ "file_path": "owncloud/web/packages/design-system/changelog/12.0.0_2022-02-07/change-remove-oc-table-files", "repo_id": "owncloud", "token_count": 104 }
671
Enhancement: Sizes The size variables which define margins and paddings have been changed to use multiples of 8 instead of 10. https://github.com/owncloud/owncloud-design-system/pull/1858
owncloud/web/packages/design-system/changelog/12.0.0_2022-02-07/enhancement-sizes/0
{ "file_path": "owncloud/web/packages/design-system/changelog/12.0.0_2022-02-07/enhancement-sizes", "repo_id": "owncloud", "token_count": 53 }
672
Bugfix: Icons/Thumbnails were only visible for clickable resources We fixed that only clickable resources had icons/thumbnails in `OcResource`. It was fixed by introducing an `OcResourceLink` component that reduces code complexity and duplication when linking resources. https://github.com/owncloud/owncloud-design-system/pull/2007
owncloud/web/packages/design-system/changelog/13.0.0_2022-03-23/bugfix-icon-only-visible-for-clickable-resources/0
{ "file_path": "owncloud/web/packages/design-system/changelog/13.0.0_2022-03-23/bugfix-icon-only-visible-for-clickable-resources", "repo_id": "owncloud", "token_count": 82 }
673
Enhancement: Add OcContextualHelper We've added a contextual helper component to provide more information based on the context https://github.com/owncloud/web/issues/6590 https://github.com/owncloud/owncloud-design-system/pull/2064
owncloud/web/packages/design-system/changelog/13.1.0_2022-06-07/enhancement-add-contextual-helper-component/0
{ "file_path": "owncloud/web/packages/design-system/changelog/13.1.0_2022-06-07/enhancement-add-contextual-helper-component", "repo_id": "owncloud", "token_count": 66 }
674
Bugfix: Lazy loading render performance The render performance of the lazy loading option in tables (OcTable, OcTableSimple) has been improved by removing the debounce option and by moving the lazy loading visualization from the OcTd to the OcTr component. For lazy loading, the colspan property has to be provided now. https://github.com/owncloud/owncloud-design-system/pull/2260 https://github.com/owncloud/owncloud-design-system/pull/2266 https://github.com/owncloud/web/issues/7038
owncloud/web/packages/design-system/changelog/14.0.0_2022-11-03/bugfix-lazy-loading-table/0
{ "file_path": "owncloud/web/packages/design-system/changelog/14.0.0_2022-11-03/bugfix-lazy-loading-table", "repo_id": "owncloud", "token_count": 133 }
675
Enhancement: Adjust breadcrumb spacing We've adjusted some spacing in the breadcrumbs to improve the overall look. https://github.com/owncloud/web/issues/7676 https://github.com/owncloud/web/issues/7525 https://github.com/owncloud/owncloud-design-system/pull/2329
owncloud/web/packages/design-system/changelog/14.0.0_2022-11-03/enhancement-breadcrumb-spacing/0
{ "file_path": "owncloud/web/packages/design-system/changelog/14.0.0_2022-11-03/enhancement-breadcrumb-spacing", "repo_id": "owncloud", "token_count": 82 }
676
Bugfix: Fix component docs The docs were broken after merging Elements and Patterns into a Components section. Apparently `Components` is not allowed as section name for technical reasons, so we renamed it to `oC Components`. https://github.com/owncloud/owncloud-design-system/pull/937
owncloud/web/packages/design-system/changelog/2.0.1_2020-12-02/fix-docs/0
{ "file_path": "owncloud/web/packages/design-system/changelog/2.0.1_2020-12-02/fix-docs", "repo_id": "owncloud", "token_count": 70 }
677
Change: Remove basic styles We've removed styles from the body element and from the #oc-content element. We were forcing styles on a global level which were too specific and because of that limited the usage of the design system. Any specific styling like that should be done in the consuming app. https://github.com/owncloud/owncloud-design-system/pull/1084
owncloud/web/packages/design-system/changelog/3.0.0_2021-02-24/remove-basic-styles/0
{ "file_path": "owncloud/web/packages/design-system/changelog/3.0.0_2021-02-24/remove-basic-styles", "repo_id": "owncloud", "token_count": 85 }
678
Enhancement: Improve documentation for image and user component Changed the documentation markup for more semantic HTML that also looks better. https://github.com/owncloud/owncloud-design-system/pull/1133
owncloud/web/packages/design-system/changelog/3.2.0_2021-03-12/enhancement-improve-image-docs/0
{ "file_path": "owncloud/web/packages/design-system/changelog/3.2.0_2021-03-12/enhancement-improve-image-docs", "repo_id": "owncloud", "token_count": 48 }
679
Enhancement: Add aria properties to radio input This also implies all the necessary accessibility changes. https://github.com/owncloud/owncloud-design-system/pull/1148
owncloud/web/packages/design-system/changelog/4.0.0_2021-03-25/enhancement-radio-accessibility/0
{ "file_path": "owncloud/web/packages/design-system/changelog/4.0.0_2021-03-25/enhancement-radio-accessibility", "repo_id": "owncloud", "token_count": 44 }
680
Enhancement: Add `oc-text-lead` class We've added a utility class called `oc-text-lead` which is increasing the font size of the text. https://github.com/owncloud/owncloud-design-system/pull/1189
owncloud/web/packages/design-system/changelog/4.2.0_2021-03-31/enhancement-text-lead/0
{ "file_path": "owncloud/web/packages/design-system/changelog/4.2.0_2021-03-31/enhancement-text-lead", "repo_id": "owncloud", "token_count": 61 }
681