conflict_resolution
stringlengths
27
16k
<<<<<<< 'filter:user.profileLinks': 'filter:user.profileMenu', 'action:post.flag': 'action:flag.create', 'action:plugin.activate': null, 'action:plugin.install': null ======= 'filter:user.profileLinks': 'filter:user.profileMenu', >>>>>>> 'filter:user.profileLinks': 'filter:user.profileMenu', 'action:post.flag': 'action:flag.create', 'action:plugin.activate': null, 'action:plugin.install': null,
<<<<<<< Meta.js.scripts = jsPaths.filter(function(path) { return path !== null; }); ======= // Remove scripts that could not be found (remove this line at v0.5.0) Meta.js.scripts = jsPaths.filter(function(path) { return path !== null }); >>>>>>> // Remove scripts that could not be found (remove this line at v0.5.0) Meta.js.scripts = jsPaths.filter(function(path) { return path !== null; });
<<<<<<< getPluginsFeatures: sinon.stub().returns({}), trigger: sinon.spy((...args) => Bluebird.resolve(args[1])), ======= getPluginsDescription: sinon.stub().returns({}), trigger: sinon.spy(function () {return Bluebird.resolve(arguments[1]);}), >>>>>>> getPluginsDescription: sinon.stub().returns({}), trigger: sinon.spy((...args) => Bluebird.resolve(args[1])),
<<<<<<< const { Origin, sources } = require("../src/Origin"); ======= const { Origin } = require("../src/Origin"); const helpers = require("../src/helpers"); >>>>>>> const { Origin, sources } = require("../src/Origin"); const helpers = require("../src/helpers");
<<<<<<< }; export const removeFalsy = array => array.filter(el => !!el); export const ensureArray = els => (Array.isArray(els) ? els : [els]); ======= }; export const hash = str => { return `${str.split("").reduce((a, b) => { a = (a << 5) - a + b.charCodeAt(0); return a & a; }, 0)}`; }; export const isUndefined = variable => typeof variable === "undefined"; export const queryId = query => (isUndefined(query) ? query : `(${JSON.stringify(query)})`); export const dashJoin = arr => arr.filter(val => !isUndefined(val)).join("-"); export const uniqueId = (id, defaultValue) => hash(`${id}${JSON.stringify(defaultValue)}`); export const queriedUniqueId = (uniqueId, queryUniqueId) => dashJoin([uniqueId, queryUniqueId]); export const seemsToBeSelectorOptions = defaultValueOrOptions => { if (!defaultValueOrOptions) { return false; } return ( defaultValueOrOptions.hasOwnProperty("defaultValue") || defaultValueOrOptions.hasOwnProperty("uuid") ); }; >>>>>>> }; export const hash = str => { return `${str.split("").reduce((a, b) => { a = (a << 5) - a + b.charCodeAt(0); return a & a; }, 0)}`; }; export const removeFalsy = array => array.filter(el => !!el); export const isUndefined = variable => typeof variable === "undefined"; export const queryId = query => (isUndefined(query) ? query : `(${JSON.stringify(query)})`); export const dashJoin = arr => arr.filter(val => !isUndefined(val)).join("-"); export const uniqueId = (id, defaultValue) => hash(`${id}${JSON.stringify(defaultValue)}`); export const queriedUniqueId = (uniqueId, queryUniqueId) => dashJoin([uniqueId, queryUniqueId]); export const ensureArray = els => (Array.isArray(els) ? els : [els]); export const seemsToBeSelectorOptions = defaultValueOrOptions => { if (!defaultValueOrOptions) { return false; } return ( defaultValueOrOptions.hasOwnProperty("defaultValue") || defaultValueOrOptions.hasOwnProperty("uuid") ); };
<<<<<<< function apiSteps () { ======= var apiSteps = function () { this.When(/^I check server health$/, function (callback) { this.api.healthCheck() .then(body => { if (body.error) { return callback(new Error(body.error.message)); } if (!body.result) { return callback(new Error('No result provided')); } if (!body.result.status || body.result.status !== 'green') { return callback('Expected {status: green"} got: ' + JSON.stringify(body.result)); } this.result = body.result; callback(); }) .catch(error => callback(error)); }); >>>>>>> function apiSteps () { this.When(/^I check server health$/, function (callback) { this.api.healthCheck() .then(body => { if (body.error) { return callback(new Error(body.error.message)); } if (!body.result) { return callback(new Error('No result provided')); } if (!body.result.status || body.result.status !== 'green') { return callback('Expected {status: green"} got: ' + JSON.stringify(body.result)); } this.result = body.result; callback(); }) .catch(error => callback(error)); });
<<<<<<< this.CONFIG = $.extend( true, {}, Tree.CONFIG, jsonConfig.chart ); this.drawArea = document.getElementById(this.CONFIG.container.substring(1)); ======= this.CONFIG = UTIL.createMerge(Tree.CONFIG, jsonConfig.chart); this.drawArea = UTIL.findEl( this.CONFIG.container, true ); >>>>>>> this.CONFIG = UTIL.extend( Tree.CONFIG, jsonConfig.chart ); this.drawArea = UTIL.findEl( this.CONFIG.container, true ); <<<<<<< this.collapsed = !this.collapsed; // toggle the collapse at each click $( this.nodeDOM ).toggleClass( 'collapsed', this.collapsed ); ======= this.collapsed = !this.collapsed; // toglle the collapse at each click UTIL.toggleClass( this.nodeDOM, 'collapsed', this.collapsed ); >>>>>>> this.collapsed = !this.collapsed; // toggle the collapse at each click UTIL.toggleClass( this.nodeDOM, 'collapsed', this.collapsed ); <<<<<<< setTimeout( function() { // set the flag after the animation tree.inAnimation = false; tree.CONFIG.callback.onCollapseFinished.apply( tree, [] ); }, ( tree.CONFIG.animation.nodeSpeed > tree.CONFIG.animation.connectorsSpeed )? tree.CONFIG.animation.nodeSpeed : tree.CONFIG.animation.connectorsSpeed ) ======= setTimeout(function() { // set the flag after the animation tree.inAnimation = false; }, tree.CONFIG.animation.nodeSpeed > tree.CONFIG.animation.connectorsSpeed ? tree.CONFIG.animation.nodeSpeed : tree.CONFIG.animation.connectorsSpeed) >>>>>>> setTimeout( function() { // set the flag after the animation tree.inAnimation = false; tree.CONFIG.callback.onCollapseFinished.apply( tree, [] ); }, ( tree.CONFIG.animation.nodeSpeed > tree.CONFIG.animation.connectorsSpeed )? tree.CONFIG.animation.nodeSpeed : tree.CONFIG.animation.connectorsSpeed ); <<<<<<< /* expose constructor globally */ ======= /* expose constructor globaly */ >>>>>>> /* expose constructor globaly */
<<<<<<< gendoc = require('./docbuilder/gendoc.js'); ======= gendoc = require('./docbuilder/gendoc.js'), config = require('./build/config.js').config; >>>>>>> gendoc = require('./docbuilder/gendoc.js'), config = require('./build/config.js').config; <<<<<<< grunt.loadNpmTasks('grunt-githooks'); ======= grunt.loadNpmTasks('grunt-contrib-copy'); >>>>>>> grunt.loadNpmTasks('grunt-githooks'); grunt.loadNpmTasks('grunt-contrib-copy');
<<<<<<< queryString, version = 'v=13751b'; ======= params, version = 'v=9db575'; >>>>>>> queryString, params, version = 'v=9db575';
<<<<<<< L.DG.ProjectDetector = L.Handler.extend({ ======= DG.Map.mergeOptions({ projectDetector: true }); DG.ProjectDetector = DG.Handler.extend({ >>>>>>> DG.ProjectDetector = DG.Handler.extend({ <<<<<<< return L.Util.extend({}, this.project); ======= return DG.Util.extend({}, this.project); >>>>>>> return DG.Util.extend({}, this.project); <<<<<<< promise = L.DG.ajax(options.url, { ======= return DG.ajax(options.url, { >>>>>>> promise = DG.ajax(options.url, { <<<<<<< this.projectsList.some(function (project) { if (this._boundInProject(project) && this._zoomInProject(project)) { this.project = project; this._map.fire('projectchange', {'getProject': L.Util.bind(this.getProject, this)}); return true; ======= for (var i = 0, mapZoom = this._map.getZoom(); i < this.projectsList.length; i++) { if (this.projectsList[i].LatLngBounds.intersects(this._map.getBounds()) && (mapZoom >= this.projectsList[i].min_zoom_level)) { this.project = this.projectsList[i]; this._map.fire('projectchange', {'getProject': DG.Util.bind(this.getProject, this)}); return; >>>>>>> this.projectsList.some(function (project) { if (this._boundInProject(project) && this._zoomInProject(project)) { this.project = project; this._map.fire('projectchange', {'getProject': DG.Util.bind(this.getProject, this)}); return true; <<<<<<< return (mapZoom >= project.min_zoom_level); ======= return new DG.LatLngBounds([parseFloat(southWest[1]), parseFloat(southWest[0])], [parseFloat(northEast[1]), parseFloat(northEast[0])] ); >>>>>>> return (mapZoom >= project.min_zoom_level); <<<<<<< L.Map.mergeOptions({ projectDetector: true }); L.Map.addInitHook('addHandler', 'projectDetector', L.DG.ProjectDetector); ======= DG.Map.addInitHook('addHandler', 'projectDetector', DG.ProjectDetector); >>>>>>> DG.Map.mergeOptions({ projectDetector: true }); DG.Map.addInitHook('addHandler', 'projectDetector', DG.ProjectDetector);
<<<<<<< /* global fullScreenApi */ L.DG.FullScreen = L.DG.Control.extend({ ======= L.DG.FullScreen = L.DG.RoundControl.extend({ statics: { Dictionary: {} }, >>>>>>> /* global fullScreenApi */ L.DG.FullScreen = L.DG.RoundControl.extend({ statics: { Dictionary: {} },
<<<<<<< var scripts; scripts = document.getElementsByTagName('script'); for (var i = scripts.length - 1; i >= 0; i--) { if (scripts[i].getAttribute('data-id') === 'dgLoader') { return scripts[i].src.split('?'); } }; ======= var scripts, scriptURL; scripts = document.getElementsByTagName('script'); scriptURL = scripts[scripts.length - 1].src; return scriptURL.split('?'); >>>>>>> var scripts; scripts = document.getElementsByTagName('script'); for (var i = scripts.length - 1; i >= 0; i--) { if (scripts[i].getAttribute('data-id') === 'dgLoader') { return scripts[i].src.split('?'); } } <<<<<<< ======= if (js.readyState) { js.onreadystatechange = function () { if (js.readyState === 'loaded' || js.readyState === 'complete') { js.onreadystatechange = null; onLoadJs(); } }; } else { js.onload = function () { onLoadJs(); }; } >>>>>>> <<<<<<< window.L.DG = {}; window.__dgApi_callbacks = []; ======= window.L.onLoad = function (callback) { onLoadJs = callback; }; >>>>>>> window.L.DG = {}; window.__dgApi_callbacks = [];
<<<<<<< //Delete it gulp.task('mytest', ['build-clean'], function () { // var css = deps.getCSSFiles({ // skin: 'dark', // isIE: true, // onlyIE: true // }); // console.log(deps.getJSFiles()); // console.log(css, css.length); // return gulp.src(deps.getCSSFiles()) // // .pipe(base64({baseDir: 'public', debug: true})) // // .pipe(base64({debug: true, extensions: ['svg', 'gif']})) // .pipe(base64({extensions: ['svg', 'gif']})) // .pipe(concat('main.css')) // // .pipe(minifyCSS()) // .pipe(gulp.dest('./public/css')); gulp.src(deps.getJSFiles()) .pipe(redust()) .pipe(gulp.dest('./public/js/')); ======= //public CLI API // Get info gulp.task('default', function () { gutil.log('\nTasks list:'); gutil.log('gulp assets # Create public folder and copy all assets there'); gutil.log('gulp lint # Check JS files for errors with JSHint'); gutil.log('gulp build # Lint, combine and minify source files, update doc, copy assets'); gutil.log('gulp doc # Generate documentation from .md files'); gutil.log('gulp test # Rebuild source and run unit tests'); >>>>>>> //Delete it gulp.task('mytest', ['build-clean'], function () { // var css = deps.getCSSFiles({ // skin: 'dark', // isIE: true, // onlyIE: true // }); // console.log(deps.getJSFiles()); // console.log(css, css.length); // return gulp.src(deps.getCSSFiles()) // // .pipe(base64({baseDir: 'public', debug: true})) // // .pipe(base64({debug: true, extensions: ['svg', 'gif']})) // .pipe(base64({extensions: ['svg', 'gif']})) // .pipe(concat('main.css')) // // .pipe(minifyCSS()) // .pipe(gulp.dest('./public/css')); gulp.src(deps.getJSFiles()) .pipe(redust()) .pipe(gulp.dest('./public/js/')); }); //public CLI API // Get info gulp.task('default', function () { gutil.log('\nTasks list:'); gutil.log('gulp assets # Create public folder and copy all assets there'); gutil.log('gulp lint # Check JS files for errors with JSHint'); gutil.log('gulp build # Lint, combine and minify source files, update doc, copy assets'); gutil.log('gulp doc # Generate documentation from .md files'); gutil.log('gulp test # Rebuild source and run unit tests');
<<<<<<< this._metaHost = new DG.Meta.Host(map); ======= this._metaHost = new DG.Meta.Host(map, this); >>>>>>> this._metaHost = new DG.Meta.Host(map, this); <<<<<<< _checkTrafficHover: function (latLng, zoom) { // (DG.LatLng) var hoveredTraffic = this._isMetaHovered(latLng, this._currentTileMetaData.traffic, zoom); console.log(hoveredTraffic); if (this._currentTraffic && (!hoveredTraffic || this._currentTraffic.id !== hoveredTraffic.id)) { this._leaveCurrentTraffic(); } if (hoveredTraffic && (!this._currentTraffic || this._currentTraffic.id !== hoveredTraffic.id)) { this._currentTraffic = hoveredTraffic; this._map.fire('traffichover', {'traffic': this._currentTraffic, latlng: latLng}); } }, ======= _checkTrafficHover: function (latLng, zoom) { // (DG.LatLng, String) var hoveredTraffic = this._isMetaHovered(latLng, this._currentTileMetaData.traffic, zoom); if (this._currentTraffic && (!hoveredTraffic || this._currentTraffic.id !== hoveredTraffic.id)) { this._leaveCurrentTraffic(); } if (hoveredTraffic && (!this._currentTraffic || this._currentTraffic.id !== hoveredTraffic.id)) { this._currentTraffic = hoveredTraffic; this._map.fire('traffichover', {'traffic': this._currentTraffic, latlng: latLng}); } }, >>>>>>> _checkTrafficHover: function (latLng, zoom) { // (DG.LatLng, String) var hoveredTraffic = this._isMetaHovered(latLng, this._currentTileMetaData.traffic, zoom); console.log(hoveredTraffic); if (this._currentTraffic && (!hoveredTraffic || this._currentTraffic.id !== hoveredTraffic.id)) { this._leaveCurrentTraffic(); } if (hoveredTraffic && (!this._currentTraffic || this._currentTraffic.id !== hoveredTraffic.id)) { this._currentTraffic = hoveredTraffic; this._map.fire('traffichover', {'traffic': this._currentTraffic, latlng: latLng}); } },
<<<<<<< if ((user.visibility === AuthzConstants.visibility.LOGGEDIN && !isLoggedIn) || (user.visibility === AuthzConstants.visibility.PRIVATE && !isTargetUser)) { // Show user's publicAlias instead of displayName if it doesn't resemble a Shibboleth // identifier var invalid = /https?:\/\/|shibboleth!|@/i; if (!invalid.test(user.publicAlias)) { user.displayName = user.publicAlias; } user.picture = {}; ======= if (user.deleted || (needsLoggedIn && !isLoggedIn) || (isPrivate && !isTargetUser)) { user.displayName = user.publicAlias; user.picture = {}; >>>>>>> if (user.deleted || (needsLoggedIn && !isLoggedIn) || (isPrivate && !isTargetUser)) { // Show user's publicAlias instead of displayName if it doesn't resemble a Shibboleth // identifier var invalid = /https?:\/\/|shibboleth!|@/i; if (!invalid.test(user.publicAlias)) { user.displayName = user.publicAlias; } user.picture = {};
<<<<<<< // Update name to "OAE Team" RestAPI.Group.updateGroup(camAdminRestContext, oaeTeam.id, { 'displayName': 'OAE Team' }, function(err) { ======= // update name to "Xyz Team" RestAPI.Group.updateGroup(camAdminRestContext, xyzTeam.id, { 'name': 'Xyz Team' }, function(err) { >>>>>>> // Update name to "Xyz Team" RestAPI.Group.updateGroup(camAdminRestContext, xyzTeam.id, { 'displayName': 'Xyz Team' }, function(err) {
<<<<<<< /*! * List the comments on a piece of content. */ OAE.tenantServer.get('/api/content/:contentId/messages', function(req, res) { ContentAPI.getComments(req.ctx, req.params.contentId, req.query.start, req.query.limit, function(err, messages) { ======= OAE.tenantServer.get('/api/content/:contentId/comments', function(req, res) { var limit = OaeUtil.getNumberParam(req.query.limit, 10, 1, 25); ContentAPI.getComments(req.ctx, req.params.contentId, req.query.start, limit, function(err, comments) { >>>>>>> /*! * List the comments on a piece of content. */ OAE.tenantServer.get('/api/content/:contentId/messages', function(req, res) { var limit = OaeUtil.getNumberParam(req.query.limit, 10, 1, 25); ContentAPI.getComments(req.ctx, req.params.contentId, req.query.start, limit, function(err, messages) { <<<<<<< ContentAPI.getLibraryItems(req.ctx, req.params.principalId, req.query.start, req.query.limit, function(err, items, nextToken) { ======= var limit = OaeUtil.getNumberParam(req.query.limit, 12, 1, 25); ContentAPI.getLibraryItems(req.ctx, req.params.principalId, req.query.start, limit, function(err, items) { >>>>>>> var limit = OaeUtil.getNumberParam(req.query.limit, 12, 1, 25); ContentAPI.getLibraryItems(req.ctx, req.params.principalId, req.query.start, limit, function(err, items, nextToken) {
<<<<<<< ======= var EventEmitter = require('events').EventEmitter; var express = require('express'); var fs = require('fs'); var http = require('http'); var redis = require('redis'); var util = require('util'); >>>>>>> var EventEmitter = require('events').EventEmitter;
<<<<<<< var restCtx = new RestContext('http://' + global.oaeTests.tenants.localhost.host, userId, null, global.oaeTests.tenants.localhost.host); RestUtil.setupEmptyJar(restCtx); RestAPI.Admin.loginWithSignedToken(restCtx, token, function(err) { ======= var restCtx = new RestContext('http://' + global.oaeTests.tenants.localhost.host, null, null, global.oaeTests.tenants.localhost.host); RestAPI.Authentication.loginWithSignedToken(restCtx, token, function(err) { >>>>>>> var restCtx = new RestContext('http://' + global.oaeTests.tenants.localhost.host, null, null, global.oaeTests.tenants.localhost.host); RestAPI.Admin.loginWithSignedToken(restCtx, token, function(err) {
<<<<<<< contentObj.downloadLink = '/api/content/' + contentObj.contentId + '/download'; var options = { 'resourceId': contentObj.contentId }; getStorageBackend(ctx).store(ctx, file, options, function(err, uri) { ======= contentObj.downloadPath = '/api/content/' + contentObj.id + '/download'; getStorageBackend(ctx).store(ctx, file, function(err, uri) { >>>>>>> contentObj.downloadPath = '/api/content/' + contentObj.id + '/download'; var options = { 'resourceId': contentObj.contentId }; getStorageBackend(ctx).store(ctx, file, options, function(err, uri) {
<<<<<<< OAE.globalAdminServer.post('/api/content/reprocessPreviews', function(req, res) { req.telemetryUrl = '/api/content/reprocessPreviews'; var filters = {}; _.each(req.body, function(value, name) { if (name.indexOf('content_') === 0) { filters.content = filters.content || {}; filters.content[name.substr(8)] = value; } else if (name.indexOf('revision_') === 0) { filters.revision = filters.revision || {}; filters.revision[name.substr(9)] = value; ======= OAE.globalAdminRouter.on('post', '/api/content/reprocessPreviews', function(req, res) { var statuses = null; if (req.body.status) { if (_.isArray(req.body.status)) { statuses = req.body.status; } else { statuses = [req.body.status]; >>>>>>> OAE.globalAdminRouter.on('post', '/api/content/reprocessPreviews', function(req, res) { req.telemetryUrl = '/api/content/reprocessPreviews'; var filters = {}; _.each(req.body, function(value, name) { if (name.indexOf('content_') === 0) { filters.content = filters.content || {}; filters.content[name.substr(8)] = value; } else if (name.indexOf('revision_') === 0) { filters.revision = filters.revision || {}; filters.revision[name.substr(9)] = value;
<<<<<<< ======= } }, 'email': { 'router': { 'object': ['managers'] >>>>>>> } }, 'email': { 'router': { 'object': ['managers'] <<<<<<< 'object': ['managers', '^online-authors'] }, 'email': { 'email': true, 'emailTemplateModule': 'oae-content', 'emailTemplateId': 'notify-content-update' ======= 'object': ['managers'] } }, 'email': { 'router': { 'object': ['managers'] >>>>>>> 'object': ['managers', '^online-authors'] } }, 'email': { 'router': { 'object': ['managers', '^online-authors'] <<<<<<< ======= } }, 'email': { 'router': { 'object': ['managers'] >>>>>>> } }, 'email': { 'router': { 'object': ['managers']
<<<<<<< ConfigTestUtil.updateConfigAndWait(globalAdminRestContext, null, {'oae-activity/activity/enabled': true}, function(err) { ======= ConfigTestsUtil.updateConfigAndWait(globalAdminRestContext, null, 'oae-activity/activity/enabled', true, function(err) { >>>>>>> ConfigTestsUtil.updateConfigAndWait(globalAdminRestContext, null, {'oae-activity/activity/enabled': true}, function(err) { <<<<<<< ConfigTestUtil.updateConfigAndWait(globalAdminRestContext, null, {'oae-activity/activity/enabled': false}, function(err) { ======= ConfigTestsUtil.updateConfigAndWait(globalAdminRestContext, null, 'oae-activity/activity/enabled', false, function(err) { >>>>>>> ConfigTestsUtil.updateConfigAndWait(globalAdminRestContext, null, {'oae-activity/activity/enabled': false}, function(err) { <<<<<<< ConfigTestUtil.updateConfigAndWait(globalAdminRestContext, null, {'oae-activity/activity/enabled': true}, function(err) { ======= ConfigTestsUtil.updateConfigAndWait(globalAdminRestContext, null, 'oae-activity/activity/enabled', true, function(err) { >>>>>>> ConfigTestsUtil.updateConfigAndWait(globalAdminRestContext, null, {'oae-activity/activity/enabled': true}, function(err) {
<<<<<<< //_getAllRoles(principalUuid, resourceUuid, callback); getAllUserRoles(principalUuid, resourceUuid, callback); } ======= _getAllRoles(principalUuid, resourceUuid, callback); }; >>>>>>> //_getAllRoles(principalUuid, resourceUuid, callback); getAllUserRoles(principalUuid, resourceUuid, callback); }; <<<<<<< checkGroupMember(principalUuid, groupUuid, callback); //isAllowedAny(principalUuid, groupUuid, callback); } ======= isAllowedAny(principalUuid, groupUuid, callback); }; >>>>>>> checkGroupMember(principalUuid, groupUuid, callback); //isAllowedAny(principalUuid, groupUuid, callback); };
<<<<<<< assert.equal(doc.profilePath, '/group/' + doc.tenant.alias + '/' + AuthzUtil.getResourceFromId(doc.id).resourceId); ======= assert.equal(doc.profilePath, '/group/' + doc.id); >>>>>>> assert.equal(doc.profilePath, '/group/' + doc.tenant.alias + '/' + AuthzUtil.getResourceFromId(doc.id).resourceId); <<<<<<< assert.equal(doc.profilePath, '/group/' + doc.tenant.alias + '/' + AuthzUtil.getResourceFromId(doc.id).resourceId); ======= assert.equal(doc.profilePath, '/group/' + doc.id); >>>>>>> assert.equal(doc.profilePath, '/group/' + doc.tenant.alias + '/' + AuthzUtil.getResourceFromId(doc.id).resourceId); <<<<<<< RestAPI.Group.createGroup(jackRestContext, groupAlias, 'A really awesome group', 'public', 'no', [], [], function(err, group) { ======= RestAPI.Group.createGroup(jackRestContext, uniqueString, uniqueString, uniqueString, 'public', 'no', [], [], function(err, group) { >>>>>>> RestAPI.Group.createGroup(jackRestContext, uniqueString, uniqueString, 'public', 'no', [], [], function(err, group) { <<<<<<< RestAPI.Group.createGroup(jackRestContext, groupAlias, 'A really awesome group', 'public', 'no', [], [sith.id], function(err, group) { ======= RestAPI.Group.createGroup(jackRestContext, groupAlias, groupAlias, uniqueString, 'public', 'no', [], [sith.id], function(err, group) { >>>>>>> RestAPI.Group.createGroup(jackRestContext, groupAlias, uniqueString, 'public', 'no', [], [sith.id], function(err, group) { <<<<<<< RestAPI.Group.createGroup(lukeSkywalkerRestContext, privateTenantGroupAlias, 'A luke skywalker tenant group', 'loggedin', 'yes', [], [], function(err, privateTenantGroup) { ======= RestAPI.Group.createGroup(lukeSkywalkerRestContext, privateTenantGroupAlias, privateTenantGroupAlias, uniqueStringC, 'loggedin', 'yes', [], [], function(err, privateTenantGroup) { >>>>>>> RestAPI.Group.createGroup(lukeSkywalkerRestContext, privateTenantGroupAlias, uniqueStringC, 'loggedin', 'yes', [], [], function(err, privateTenantGroup) { <<<<<<< RestAPI.Group.createGroup(camAdminRestContext, groupAlias, 'A really awesome group', 'public', 'no', [], [], function(err, group) { ======= RestAPI.Group.createGroup(camAdminRestContext, groupAlias, groupAlias, 'A group for Jack', 'public', 'no', [], [], function(err, group) { >>>>>>> RestAPI.Group.createGroup(camAdminRestContext, groupAlias, 'A group for Jack', 'public', 'no', [], [], function(err, group) {
<<<<<<< /*! * It's a bit tricky to test timezones as each OS handles this differently. * For instance, it's possible to set the timezone `Brussels` on OS X, but it is * not valid to do this on Linux. Therefor we grab the list of server-supported * timezones and validate against that. */ var validTimeZones = {}; time.listTimezones(function(err, timezones) { for (var i = 0; i < timezones.length; i++) { validTimeZones[timezones[i]] = true; } }); /*! ======= /** >>>>>>> /*!
<<<<<<< 'q_high': fullText, 'sort': fullText, 'extra': { 'publicAlias': user.publicAlias ======= 'general': general, 'sort': general, '_extra': { 'publicAlias': user.publicAlias, 'userExtra': user.extra >>>>>>> 'q_high': fullText, 'sort': fullText, '_extra': { 'publicAlias': user.publicAlias, 'userExtra': user.extra <<<<<<< // Full text searching is done on the name, alias and description. Though, the group.name is scored higher through `q_high`. var fullText = _.compact([group.name, group.alias, group.description]).join(' '); ======= var general = _.compact([group.displayName, group.alias, group.description]).join(' '); >>>>>>> // Full text searching is done on the name, alias and description. Though, the group.name is scored higher through `q_high`. var fullText = _.compact([group.displayName, group.alias, group.description]).join(' '); <<<<<<< var fields = doc.fields; // First we need to convert the data in this document back into the source user object so that we may use PrincipalsUtil.hideUserData // to hide its information. We will then after convert the user *back* to a search document once the user information has been // scrubbed. var user = new User(fields.tenantAlias, docId, fields.title, { ======= var fields = doc.fields // Create a user from the search document to transform, including the extras var user = new User(fields.tenantAlias, docId, fields.displayName, { >>>>>>> var fields = doc.fields; // First we need to convert the data in this document back into the source user object so that we may use PrincipalsUtil.hideUserData // to hide its information. We will then after convert the user *back* to a search document once the user information has been // scrubbed. var user = new User(fields.tenantAlias, docId, fields.displayName, { <<<<<<< // Hide information that is sensitive to the current session ======= // Hide information that is sensitive to the current session, then transform it back into a search document using the producer >>>>>>> // Hide information that is sensitive to the current session <<<<<<< // We need to delete these fields which are added by the producer but aren't supposed to be included in the UI. delete result.q_high; ======= // Promote the user extension properties (extra) to the doc from the "_extra" search field result.extra = result._extra.userExtra; // Remove the general and sort fields that are placed on the search document. these should not go into the view model delete result.general; >>>>>>> // We need to delete these fields which are added by the producer but aren't supposed to be included in the UI. delete result.q_high;
<<<<<<< var ContentAPI = require('oae-content'); ======= var log = require('oae-logger').logger('oae-principals'); >>>>>>> var ContentAPI = require('oae-content'); var log = require('oae-logger').logger('oae-principals'); <<<<<<< var Signature = require('oae-util/lib/signature'); var Validator = require('oae-util/lib/validator').Validator; ======= >>>>>>> var Signature = require('oae-util/lib/signature'); var Validator = require('oae-util/lib/validator').Validator;
<<<<<<< var AuthenticationAPI = require('oae-authentication'); var AuthenticationConstants = require('oae-authentication/lib/constants').AuthenticationConstants; ======= var Tenant = require('oae-tenants/lib/model').Tenant; >>>>>>> var Tenant = require('oae-tenants/lib/model').Tenant; var AuthenticationAPI = require('oae-authentication'); var AuthenticationConstants = require('oae-authentication/lib/constants').AuthenticationConstants; <<<<<<< var globalAdmin = new User('global', null, 'The global admin User', { visibility: 'private', isGlobalAdmin: true, isTenantAdmin: true }); ======= global.oaeTests.tenants.global = new Tenant('admin', 'Global tenant', 'localhost:2000'); var globalAdmin = new User(global.oaeTests.tenants.global, null, 'administrator', 'private', 'en_GB', 'Europe/London', 'Admin', 'User', 'The global admin User', true, true); >>>>>>> global.oaeTests.tenants.global = new Tenant('admin', 'Global tenant', 'localhost:2000'); var globalAdmin = new User('global', null, 'The global admin User', { visibility: 'private', isGlobalAdmin: true, isTenantAdmin: true }); <<<<<<< TenantsAPI.createTenant(globalContext, 'camtest', 'Cambridge University Test', 2001, 'http://localhost:2001', function(err, tenant) { if (err) { log().error({err: err}); return callback(err); } ======= TenantsAPI.createTenant(globalContext, 'camtest', 'Cambridge University Test', 'cambridge.oae.com', function(err, tenant) { >>>>>>> TenantsAPI.createTenant(globalContext, 'camtest', 'Cambridge University Test', 'cambridge.oae.com', function(err, tenant) { if (err) { log().error({err: err}); return callback(err); } <<<<<<< TenantsAPI.createTenant(globalContext, 'gttest', 'Georgia Tech Test', 2002, 'http://localhost:2002', function(err, tenant) { if (err) { return callback(err); } ======= TenantsAPI.createTenant(globalContext, 'gttest', 'Georgia Tech Test', 'gt.oae.com', function(err, tenant) { >>>>>>> TenantsAPI.createTenant(globalContext, 'gttest', 'Georgia Tech Test', 'gt.oae.com', function(err, tenant) { if (err) { return callback(err); }
<<<<<<< 'restContext': new RestContext(restCtx.baseUrl, username, 'password') ======= 'restContext': new RestContext(restCtx.host, userObj.username, 'password', restCtx.hostHeader) >>>>>>> 'restContext': new RestContext(restCtx.host, username, 'password', restCtx.hostHeader) <<<<<<< (function() { var username = generateTestUserId('random-user'); RestAPI.User.createUser(createAdminRestContext(restCtx.baseUrl), username, 'password', 'John Doe', null, function(err, userObj) { userCreated(err, userObj, username); }); })(); ======= RestAPI.User.createUser(restCtx, generateTestUserId('random-user'), 'password', 'John Doe', null, userCreated); >>>>>>> (function() { var username = generateTestUserId('random-user'); RestAPI.User.createUser(restCtx, username, 'password', 'John Doe', null, function(err, userObj) { userCreated(err, userObj, username); }); })(); <<<<<<< var createAdminRestContext = module.exports.createAdminRestContext = function(baseUrl) { return new RestContext(baseUrl, 'administrator', 'administrator'); }; /** * Create an API Context object that represents a tenant admin of the given tenant. * @param {Tenant} tenant The tenant for which the context should be an administrator * @return {Context} The api context that represents an administrator of the tenant */ var createTenantAdminContext = module.exports.createTenantAdminContext = function(tenant) { return new Context(tenant, new User(tenant.alias, null, 'Tenant Administrator', { isTenantAdmin: true })); } ======= var createTenantAdminRestContext = module.exports.createTenantAdminRestContext = function(host) { return createTenantRestContext(host, 'administrator', 'administrator'); }; /** * Create a Rest Context object that represents an anonymous or logged in user on the global admin server * and can be created for tests * * @param {String} [username] Username for the user performing the request. This should be null for an anonymous user. * @param {String} [password] Password for the user performing the request. This should be null for an anonymous user * @return {RestContext} Rest Context object that represents the anonymous or logged in user on the global admin server */ var createGlobalRestContext = module.exports.createGlobalRestContext = function(username, password) { return new RestContext('http://localhost:2000', username, password); }; /** * Create a Rest Context object that represents the admin user on the global admin server and can be created * for tests * * @return {RestContext} Rest Context object that represents the global admin user on the provided tenant */ var createGlobalAdminRestContext = module.exports.createGlobalAdminRestContext = function() { return createGlobalRestContext('administrator', 'administrator'); }; >>>>>>> var createTenantAdminRestContext = module.exports.createTenantAdminRestContext = function(host) { return createTenantRestContext(host, 'administrator', 'administrator'); }; /** * Create a Rest Context object that represents an anonymous or logged in user on the global admin server * and can be created for tests * * @param {String} [username] Username for the user performing the request. This should be null for an anonymous user. * @param {String} [password] Password for the user performing the request. This should be null for an anonymous user * @return {RestContext} Rest Context object that represents the anonymous or logged in user on the global admin server */ var createGlobalRestContext = module.exports.createGlobalRestContext = function(username, password) { return new RestContext('http://localhost:2000', username, password); }; /** * Create a Rest Context object that represents the admin user on the global admin server and can be created * for tests * * @return {RestContext} Rest Context object that represents the global admin user on the provided tenant */ var createGlobalAdminRestContext = module.exports.createGlobalAdminRestContext = function() { return createGlobalRestContext('administrator', 'administrator'); }; /** * Create an API Context object that represents a tenant admin of the given tenant. * * @param {Tenant} tenant The tenant for which the context should be an administrator * @return {Context} The api context that represents an administrator of the tenant */ var createTenantAdminContext = module.exports.createTenantAdminContext = function(tenant) { return new Context(tenant, new User(tenant.alias, null, 'Tenant Administrator', { isTenantAdmin: true })); }
<<<<<<< RestAPI.Group.createGroup(restCtx, 'Group title', 'Group description', 'public', 'yes', [], [], groupCreated); ======= RestAPI.Group.createGroup(restCtx, generateTestGroupId('random-group'), generateTestGroupId('random-title'), generateTestGroupId('random-description'), 'public', 'yes', [], [], groupCreated); >>>>>>> RestAPI.Group.createGroup(restCtx, generateTestGroupId('random-title'), generateTestGroupId('random-description'), 'public', 'yes', [], [], groupCreated);
<<<<<<< that.picture = {}; if (opts.smallPictureUri) { that.picture.smallUri = opts.smallPictureUri; } if (opts.mediumPictureUri) { that.picture.mediumUri = opts.mediumPictureUri; } if (opts.largePictureUri) { that.picture.largeUri = opts.largePictureUri; } that.profilePath = util.format('/user/%s/%s', tenantAlias, resourceId); ======= that.profilePath = '/user/' + tenantAlias + '/' + resourceId; >>>>>>> that.profilePath = util.format('/user/%s/%s', tenantAlias, resourceId);
<<<<<<< RestAPI.Tenant.getTenant(aarRestContext, null, function(err, tenant) { ======= RestAPI.Tenant.getTenant(aarRestContext, function(err, tenant) { >>>>>>> RestAPI.Tenant.getTenant(aarRestContext, null, function(err, tenant) { <<<<<<< ======= /** * Test that verifies that a tenant can not be stopped by an anonymous user */ it('verify stop tenant as anonymous user fails', function(callback) { // Try to stop the tenant as an anonymous user RestAPI.Tenant.stopTenant(anonymousGlobalRestContext, 2103, function(err) { assert.ok(err); assert.equal(err.code, 401); callback(); }); }); >>>>>>> /** * Test that verifies that a tenant can not be stopped by an anonymous user */ it('verify stop tenant as anonymous user fails', function(callback) { // Try to stop the tenant as an anonymous user RestAPI.Tenant.stopTenant(anonymousGlobalRestContext, 2103, function(err) { assert.ok(err); assert.equal(err.code, 401); callback(); }); }); <<<<<<< callback(); ======= // Try an update as the tenant admin RestAPI.Tenant.updateTenant(camAdminRestContext, 2001, 'Queens College', function(err) { assert.ok(!err); // Check if the update was successful RestAPI.Tenant.getTenant(camAdminRestContext, function(err, tenant) { assert.ok(!err); assert.ok(tenant); assert.equal(tenant.port, 2001); assert.equal(tenant.alias, 'camtest'); assert.equal(tenant.name, 'Queens College'); callback(); }); }); >>>>>>> // Try an update as the tenant admin RestAPI.Tenant.updateTenant(camAdminRestContext, 2001, 'Queens College', function(err) { assert.ok(!err); // Check if the update was successful RestAPI.Tenant.getTenant(camAdminRestContext, null, function(err, tenant) { assert.ok(!err); assert.ok(tenant); assert.equal(tenant.port, 2001); assert.equal(tenant.alias, 'camtest'); assert.equal(tenant.name, 'Queens College'); callback(); }); });
<<<<<<< assert.equal(response.statusCode, 204); RestAPI.User.downloadPicture(contexts['simon'].restContext, contexts['simon'].user.id, 'medium', function(err, body, response) { assert.ok(!err); assert.equal(response.statusCode, 204); RestAPI.User.downloadPicture(contexts['simon'].restContext, contexts['simon'].user.id, 'large', function(err, body, response) { assert.ok(!err); assert.equal(response.statusCode, 204); // Now try downloading it with some invalid parameters. RestAPI.User.downloadPicture(contexts['simon'].restContext, 'invalid-user-id', 'small', function(err, body, response) { assert.equal(err.code, 400); RestAPI.User.downloadPicture(contexts['simon'].restContext, contexts['simon'].user.id, null, function(err, body, response) { assert.equal(err.code, 400); // Nicolaas has no picture, this should result in a 404 RestAPI.User.downloadPicture(contexts['simon'].restContext, contexts['nicolaas'].user.id, 'small', function(err, body, response) { assert.equal(err.code, 404); callback(); }); }); }); }); ======= verifyCropping(ctx, ctx.user, createSelectedArea(20000, 10, 100), 400, function() { verifyCropping(ctx, ctx.user, createSelectedArea(10, 200000, 100), 400, callback); >>>>>>> assert.equal(response.statusCode, 204); RestAPI.User.downloadPicture(contexts['simon'].restContext, contexts['simon'].user.id, 'medium', function(err, body, response) { assert.ok(!err); assert.equal(response.statusCode, 204); RestAPI.User.downloadPicture(contexts['simon'].restContext, contexts['simon'].user.id, 'large', function(err, body, response) { assert.ok(!err); assert.equal(response.statusCode, 204); // Now try downloading it with some invalid parameters. RestAPI.User.downloadPicture(contexts['simon'].restContext, 'invalid-user-id', 'small', function(err, body, response) { assert.equal(err.code, 400); RestAPI.User.downloadPicture(contexts['simon'].restContext, contexts['simon'].user.id, null, function(err, body, response) { assert.equal(err.code, 400); // Nicolaas has no picture, this should result in a 404 RestAPI.User.downloadPicture(contexts['simon'].restContext, contexts['nicolaas'].user.id, 'small', function(err, body, response) { assert.equal(err.code, 404); callback(); }); }); }); }); <<<<<<< /*! * Verify that you can upload/crop/download profile pictures for groups. */ it('verify uploading, cropping and downloading of group profile pictures', function(callback) { createUser(function(ctx) { TestsUtil.generateTestGroups(ctx, 1, function(err, groups) { var group = groups[Object.keys(groups)[0]]; RestAPI.Group.uploadPicture(ctx, group.id, getPictureStream, null, function(err) { assert.ok(!err); verifyCropping(ctx, group.id, createSelectedArea(-10, 10, 200), 400, function() { verifyCropping(ctx, group.id, createSelectedArea(10, -10, 200), 400, function() { verifyCropping(ctx, group.id, createSelectedArea(-10, -10, 200), 400, function() { verifyCropping(ctx, group.id, createSelectedArea(10, 10, 200), 200, function() { // Download the different sizes. RestAPI.Group.downloadPicture(ctx, group.id, 'small', function(err, body, request) { assert.ok(!err); assert.equal(request.statusCode, 204); RestAPI.Group.downloadPicture(ctx, group.id, 'medium', function(err, body, request) { ======= /*! * Verify that you can upload/crop/download profile pictures for groups. */ it('verify uploading, cropping and downloading of group profile pictures', function(callback) { createUser(function(ctx) { TestsUtil.generateTestGroups(ctx, 1, function(err, groups) { var group = groups[Object.keys(groups)[0]]; RestAPI.Group.uploadPicture(ctx, group.id, getPictureStream, null, function(err) { assert.ok(!err); verifyCropping(ctx, group, createSelectedArea(-10, 10, 200), 400, function() { verifyCropping(ctx, group, createSelectedArea(10, -10, 200), 400, function() { verifyCropping(ctx, group, createSelectedArea(-10, -10, 200), 400, function() { verifyCropping(ctx, group, createSelectedArea(10, 10, 200), 200, function() { // Download the different sizes. RestAPI.Group.downloadPicture(ctx, group.id, 'small', function(err, body, request) { >>>>>>> /*! * Verify that you can upload/crop/download profile pictures for groups. */ it('verify uploading, cropping and downloading of group profile pictures', function(callback) { createUser(function(ctx) { TestsUtil.generateTestGroups(ctx, 1, function(err, groups) { var group = groups[Object.keys(groups)[0]]; RestAPI.Group.uploadPicture(ctx, group.id, getPictureStream, null, function(err) { assert.ok(!err); verifyCropping(ctx, group, createSelectedArea(-10, 10, 200), 400, function() { verifyCropping(ctx, group, createSelectedArea(10, -10, 200), 400, function() { verifyCropping(ctx, group, createSelectedArea(-10, -10, 200), 400, function() { verifyCropping(ctx, group, createSelectedArea(10, 10, 200), 200, function() { // Download the different sizes. RestAPI.Group.downloadPicture(ctx, group.id, 'small', function(err, body, request) { assert.ok(!err); assert.equal(request.statusCode, 204); RestAPI.Group.downloadPicture(ctx, group.id, 'medium', function(err, body, request) { <<<<<<< verifyCropping(contexts['nicolaas'].restContext, group.id, createSelectedArea(10, 10, 200), 200, callback); ======= RestAPI.Group.uploadPicture(contexts['nicolaas'].restContext, group.id, getPictureStream, null, function(err) { assert.ok(!err); verifyCropping(contexts['nicolaas'].restContext, group, createSelectedArea(10, 10, 200), 200, callback); }); >>>>>>> verifyCropping(contexts['nicolaas'].restContext, group, createSelectedArea(10, 10, 200), 200, callback);
<<<<<<< ======= var crypto = require('crypto'); var util = require('util'); >>>>>>> var util = require('util');
<<<<<<< var util = require('util'); ======= var Stream = require('stream').Stream >>>>>>> var Stream = require('stream').Stream var util = require('util');
<<<<<<< // Hide information that is sensitive to the current session, then transform it back into a search document using the producer ======= // If there is a thumbnail in the search document, we add it on the user object. // It will be removed from it if the current user should not be allowed to see it. if (fields.thumbnailUrl) { user.mediumPictureUri = fields.thumbnailUrl; } // hide information that is sensitive to the current session, then transform it back into a search document using the producer >>>>>>> // If there is a thumbnail in the search document, we add it on the user object. // It will be removed from it if the current user should not be allowed to see it. if (fields.thumbnailUrl) { user.mediumPictureUri = fields.thumbnailUrl; } // Hide information that is sensitive to the current session, then transform it back into a search document using the producer <<<<<<< // Promote the user extension properties (extra) to the doc from the "_extra" search field result.extra = result._extra.userExtra; // Remove the general and sort fields that are placed on the search document. these should not go into the view model ======= // If the mediumPictureUri wasn't scrubbed from the user object that means the current user can see it. // Generate a downloadable url for it. if (user.mediumPictureUri) { result.thumbnailUrl = PrincipalsUtil.getSignedPictureUrl(ctx.tenant().alias, user.mediumPictureUri); } result.resourceType = 'user'; >>>>>>> // If the mediumPictureUri wasn't scrubbed from the user object that means the current user can see it. // Generate a downloadable url for it. if (user.mediumPictureUri) { result.thumbnailUrl = PrincipalsUtil.getSignedPictureUrl(ctx.tenant().alias, user.mediumPictureUri); } result.resourceType = 'user'; // Promote the user extension properties (extra) to the doc from the "_extra" search field result.extra = result._extra.userExtra; // Remove the general and sort fields that are placed on the search document. these should not go into the view model <<<<<<< ======= delete result.extra; >>>>>>>
<<<<<<< * @param {Context} ctx The current context, used to determine the tenant of the user to get / create * @param {String} authProvider The authentication provider of the login id * @param {String} externalId The desired externalId/username for this user * @param {String} displayName The user's display name * @param {String} [opts] Optional user profile parameters * @param {String} [opts.locale] The user's locale * @param {String} [opts.email] The user's email address * @param {String} [opts.visibility] The user's visibility. One of: @see AuthzConstants.visibility * @param {String} [opts.publicAlias] The alias to show when the user is private / inaccessible by the current user * @param {String} [opts.emailPreference] The user's email preference. One of: @see PrincipalsConstants.emailPreference * @param {Function} callback Standard callback function * @param {Object} callback.err An error that occured, if any * @param {Boolean} callback.user The user object * @param {Boolean} callback.created Whether or not a new user was created ======= * @param {Context} ctx The current context, used to determine the tenant of the user to get / create * @param {String} authProvider The authentication provider of the login id * @param {String} externalId The desired externalId/username for this user * @param {Object} providerProperties The arbitrary properties associated the auto provider (e.g., `password` for local auth) * @param {String} displayName The user's display name * @param {String} [opts] Optional user profile parameters * @param {String} [opts.locale] The user's locale * @param {String} [opts.email] The user's email address * @param {String} [opts.timezone] The user's timezone * @param {String} [opts.visibility] The user's visibility. One of: @see AuthzConstants.visibility * @param {String} [opts.publicAlias] The alias to show when the user is private / inaccessible by the current user * @param {Function} callback Standard callback function * @param {Object} callback.err An error that occured, if any * @param {User} callback.user The user associated with the provided external id * @param {Boolean} callback.created Whether or not a new user was created >>>>>>> * @param {Context} ctx The current context, used to determine the tenant of the user to get / create * @param {String} authProvider The authentication provider of the login id * @param {String} externalId The desired externalId/username for this user * @param {String} displayName The user's display name * @param {String} [opts] Optional user profile parameters * @param {String} [opts.locale] The user's locale * @param {String} [opts.email] The user's email address * @param {String} [opts.visibility] The user's visibility. One of: @see AuthzConstants.visibility * @param {String} [opts.publicAlias] The alias to show when the user is private / inaccessible by the current user * @param {String} [opts.emailPreference] The user's email preference. One of: @see PrincipalsConstants.emailPreference * @param {Function} callback Standard callback function * @param {Object} callback.err An error that occured, if any * @param {Boolean} callback.user The user object * @param {Boolean} callback.created Whether or not a new user was created <<<<<<< * @param {Context} ctx The current context * @param {LoginId} loginId The login id that will be associated with the user so they may log in * @param {String} displayName The user's display name * @param {Object} [opts] Optional user profile parameters * @param {String} [opts.locale] The user's locale * @param {String} [opts.email] The user's email address * @param {String} [opts.visibility] The user's visibility. One of: @see AuthzConstants.visibility * @param {String} [opts.publicAlias] The alias to show when the user is private / inaccessible by the current user * @param {String} [opts.emailPreference] The user's email preference. One of: @see PrincipalsConstants.emailPreference * @param {Function} callback Standard callback function * @param {Object} callback.err An error that occurred, if any * @param {Boolean} callback.user User object representing the created user ======= * @param {Context} ctx The current context * @param {LoginId} loginId The login id that will be associated with the tenant administrator so they may log in * @param {String} displayName The tenant administrator's display name * @param {Object} [opts] Optional user profile parameters * @param {String} [opts.email] The tenant administrator's email address * @param {String} [opts.locale] The tenant administrator's locale * @param {String} [opts.timezone] The tenant administrator's timezone * @param {String} [opts.publicAlias] The alias to show when the tenant administrator is private / inaccessible by the current user * @param {Function} callback Standard callback function * @param {Object} callback.err An error that occurred, if any * @param {User} callback.user User object representing the created tenant administrator */ var createTenantAdminUser = module.exports.createTenantAdminUser = function(ctx, loginId, displayName, opts, callback) { opts = opts || {}; var validator = new Validator(); validator.check(null, {'code': 400, 'msg': 'A LoginId must be provided'}).isObject(loginId); validator.check(displayName, {'code': 400, 'msg': 'You must provide a display name'}).notEmpty(); validator.check(displayName, {'code': 400, 'msg': 'A display name can be at most 1000 characters long'}).isShortString(); _validateLoginIdForPersistence(validator, loginId); if (validator.hasErrors()) { return callback(validator.getFirstError()); } var targetTenant = TenantsAPI.getTenant(loginId.tenantAlias); if (!targetTenant) { return callback({'code': 404, 'msg': 'A non-existing tenant was specified as the target for this user'}); } else if (targetTenant.isGlobalAdminServer) { return callback({'code': 400, 'msg': 'A tenant administrator cannot be created on the global admin tenant'}); } else if (!ctx.user() || !ctx.user().isAdmin(targetTenant.alias)) { return callback({'code': 401, 'msg': 'Only administrators can create new tenant administrators'}); } // Tenant administrators always start private opts.visibility = AuthzConstants.visibility.PRIVATE; // Create the user object with their login id _createUser(ctx, loginId, displayName, opts, function(err, user) { if (err) { return callback(err); } // Make the created user a tenant admin PrincipalsAPI.setTenantAdmin(ctx, user.id, true, function(err) { if (err) { return callback(err); } return callback(null, user); }); }); }; /** * Create a user with the provided login id * * @param {Context} ctx The current context * @param {LoginId} loginId The login id that will be associated with the user so they may log in * @param {String} displayName The user's display name * @param {Object} [opts] Optional user profile parameters * @param {String} [opts.locale] The user's locale * @param {String} [opts.email] The user's email address * @param {String} [opts.timezone] The user's timezone * @param {String} [opts.visibility] The user's visibility. One of: @see AuthzConstants.visibility * @param {String} [opts.publicAlias] The alias to show when the user is private / inaccessible by the current user * @param {Function} callback Standard callback function * @param {Object} callback.err An error that occurred, if any * @param {User} callback.user User object representing the created user >>>>>>> * @param {Context} ctx The current context * @param {LoginId} loginId The login id that will be associated with the tenant administrator so they may log in * @param {String} displayName The tenant administrator's display name * @param {Object} [opts] Optional user profile parameters * @param {String} [opts.email] The tenant administrator's email address * @param {String} [opts.locale] The tenant administrator's locale * @param {String} [opts.publicAlias] The alias to show when the tenant administrator is private / inaccessible by the current user * @param {String} [opts.emailPreference] The tenant administrator's email preference. One of: @see PrincipalsConstants.emailPreference * @param {Function} callback Standard callback function * @param {Object} callback.err An error that occurred, if any * @param {User} callback.user User object representing the created tenant administrator */ var createTenantAdminUser = module.exports.createTenantAdminUser = function(ctx, loginId, displayName, opts, callback) { opts = opts || {}; var validator = new Validator(); validator.check(null, {'code': 400, 'msg': 'A LoginId must be provided'}).isObject(loginId); validator.check(displayName, {'code': 400, 'msg': 'You must provide a display name'}).notEmpty(); validator.check(displayName, {'code': 400, 'msg': 'A display name can be at most 1000 characters long'}).isShortString(); _validateLoginIdForPersistence(validator, loginId); if (validator.hasErrors()) { return callback(validator.getFirstError()); } var targetTenant = TenantsAPI.getTenant(loginId.tenantAlias); if (!targetTenant) { return callback({'code': 404, 'msg': 'A non-existing tenant was specified as the target for this user'}); } else if (targetTenant.isGlobalAdminServer) { return callback({'code': 400, 'msg': 'A tenant administrator cannot be created on the global admin tenant'}); } else if (!ctx.user() || !ctx.user().isAdmin(targetTenant.alias)) { return callback({'code': 401, 'msg': 'Only administrators can create new tenant administrators'}); } // Tenant administrators always start private opts.visibility = AuthzConstants.visibility.PRIVATE; // Create the user object with their login id _createUser(ctx, loginId, displayName, opts, function(err, user) { if (err) { return callback(err); } // Make the created user a tenant admin PrincipalsAPI.setTenantAdmin(ctx, user.id, true, function(err) { if (err) { return callback(err); } return callback(null, user); }); }); }; /** * Create a user with the provided login id * * @param {Context} ctx The current context * @param {LoginId} loginId The login id that will be associated with the user so they may log in * @param {String} displayName The user's display name * @param {Object} [opts] Optional user profile parameters * @param {String} [opts.locale] The user's locale * @param {String} [opts.email] The user's email address * @param {String} [opts.visibility] The user's visibility. One of: @see AuthzConstants.visibility * @param {String} [opts.publicAlias] The alias to show when the user is private / inaccessible by the current user * @param {String} [opts.emailPreference] The user's email preference. One of: @see PrincipalsConstants.emailPreference * @param {Function} callback Standard callback function * @param {Object} callback.err An error that occurred, if any * @param {User} callback.user User object representing the created user
<<<<<<< SearchTestUtil.assertSearchEquals(userInfo0.restContext, 'email', null, {'q': userInfo0.user.email}, allUserIds, function() { return callback(); ======= // Create one of each resource with the email address as the display name so // we can ensure they don't come out of the search RestAPI.Content.createLink(userInfo0.restContext, userInfo0.user.email, userInfo0.user.email, 'public', 'google.com', [], [], [], function(err, link) { assert.ok(!err); RestAPI.Group.createGroup(userInfo0.restContext, userInfo0.user.email, userInfo0.user.email, 'public', 'yes', null, null, function(err, group) { assert.ok(!err); RestAPI.Discussions.createDiscussion(userInfo0.restContext, userInfo0.user.email, userInfo0.user.email, 'public', null, null, function(err, discussion) { assert.ok(!err); FoldersTestUtil.assertCreateFolderSucceeds(userInfo0.restContext, userInfo0.user.email, userInfo0.user.email, 'public', null, null, function(folder) { SearchTestUtil.whenIndexingComplete(function() { // Sanity check that the resources we just created can be searched with the email var allResourceIds = _.pluck([link, group, discussion, folder], 'id'); SearchTestUtil.assertSearchContains(userInfo0.restContext, 'general', null, {'q': userInfo0.user.email}, allResourceIds, function() { // Now ensure that only the users come out of the email search SearchTestUtil.assertSearchEquals(userInfo0.restContext, 'email', null, {'email': userInfo0.user.email}, allUserIds, function() { return callback(); }); }); }); }); }); }); >>>>>>> // Create one of each resource with the email address as the display name so // we can ensure they don't come out of the search RestAPI.Content.createLink(userInfo0.restContext, userInfo0.user.email, userInfo0.user.email, 'public', 'google.com', [], [], [], function(err, link) { assert.ok(!err); RestAPI.Group.createGroup(userInfo0.restContext, userInfo0.user.email, userInfo0.user.email, 'public', 'yes', null, null, function(err, group) { assert.ok(!err); RestAPI.Discussions.createDiscussion(userInfo0.restContext, userInfo0.user.email, userInfo0.user.email, 'public', null, null, function(err, discussion) { assert.ok(!err); FoldersTestUtil.assertCreateFolderSucceeds(userInfo0.restContext, userInfo0.user.email, userInfo0.user.email, 'public', null, null, function(folder) { SearchTestUtil.whenIndexingComplete(function() { // Sanity check that the resources we just created can be searched with the email var allResourceIds = _.pluck([link, group, discussion, folder], 'id'); SearchTestUtil.assertSearchContains(userInfo0.restContext, 'general', null, {'q': userInfo0.user.email}, allResourceIds, function() { // Now ensure that only the users come out of the email search SearchTestUtil.assertSearchEquals(userInfo0.restContext, 'email', null, {'q': userInfo0.user.email}, allUserIds, function() { return callback(); }); }); }); }); }); });
<<<<<<< RestAPI.Content.deleteComment(contexts['bert'].restContext, contentObj.id, comments.results[0].commentId, function(err, deleted) { ======= RestAPI.Content.deleteComment(contexts['bert'].restContext, contentObj.contentId, comments.results[0].commentId, function(err, softDeleted) { >>>>>>> RestAPI.Content.deleteComment(contexts['bert'].restContext, contentObj.id, comments.results[0].commentId, function(err, softDeleted) { <<<<<<< RestAPI.Content.deleteComment(contexts['bert'].restContext, contentObj.id, comments.results[1].commentId, function(err, deleted) { ======= RestAPI.Content.deleteComment(contexts['bert'].restContext, contentObj.contentId, comments.results[1].commentId, function(err, softDeleted) { >>>>>>> RestAPI.Content.deleteComment(contexts['bert'].restContext, contentObj.id, comments.results[1].commentId, function(err, softDeleted) { <<<<<<< RestAPI.Content.deleteComment(contexts['bert'].restContext, contentObj.id, comments.results[2].commentId, function(err, deleted) { ======= RestAPI.Content.deleteComment(contexts['bert'].restContext, contentObj.contentId, comments.results[2].commentId, function(err, softDeleted) { >>>>>>> RestAPI.Content.deleteComment(contexts['bert'].restContext, contentObj.id, comments.results[2].commentId, function(err, softDeleted) { <<<<<<< RestAPI.Content.deleteComment(contexts['bert'].restContext, contentObj.id, comments.results[1].commentId, function(err, deletedComment) { ======= RestAPI.Content.deleteComment(contexts['bert'].restContext, contentObj.contentId, comments.results[1].commentId, function(err, softDeleted) { >>>>>>> RestAPI.Content.deleteComment(contexts['bert'].restContext, contentObj.id, comments.results[1].commentId, function(err, softDeleted) { <<<<<<< RestAPI.Content.deleteComment(contexts['bert'].restContext, contentObj.id, comments.results[0].commentId, function(err, deletedComment) { ======= RestAPI.Content.deleteComment(contexts['bert'].restContext, contentObj.contentId, comments.results[0].commentId, function(err, softDeleted) { >>>>>>> RestAPI.Content.deleteComment(contexts['bert'].restContext, contentObj.id, comments.results[0].commentId, function(err, softDeleted) { <<<<<<< RestAPI.Content.deleteComment(contexts['bert'].restContext, privateContentObj.id, comment2, function(err, deleted) { ======= RestAPI.Content.deleteComment(contexts['bert'].restContext, privateContentObj.contentId, comment2, function(err, softDeleted) { >>>>>>> RestAPI.Content.deleteComment(contexts['bert'].restContext, privateContentObj.id, comment2, function(err, softDeleted) { <<<<<<< RestAPI.Content.deleteComment(contexts['bert'].restContext, publicContentObj.id, comment1, function(err, deleted) { ======= RestAPI.Content.deleteComment(contexts['bert'].restContext, publicContentObj.contentId, comment1, function(err, softDeleted) { >>>>>>> RestAPI.Content.deleteComment(contexts['bert'].restContext, publicContentObj.id, comment1, function(err, softDeleted) { <<<<<<< RestAPI.Content.deleteComment(deleteContext.restContext || deleteContext, contentObj.id, comments.results[0].commentId, function(err, deleted) { callback(err, deleted); }); ======= RestAPI.Content.deleteComment(deleteContext.restContext || deleteContext, contentObj.contentId, comments.results[0].commentId, callback); >>>>>>> RestAPI.Content.deleteComment(deleteContext.restContext || deleteContext, contentObj.id, comments.results[0].commentId, callback);
<<<<<<< /*! * prefetchCount determines how many jobs will be assigned to this node's queue at a time before getting acknowledgement on other * messages. It is configured with `mqConfig.prefetchCount`, but defaults to `Constants.DEFAULT_PREFETCH_COUNT`. */ var prefetchCount = Constants.DEFAULT_PREFETCH_COUNT; var deferredTaskHandlers = {}; var ready = false; OAE.on('ready', function() { ready = true; // Bind all the deferred task handlers now that the container is ready _.each(deferredTaskHandlers, function(handlerInfo, taskId) { bind(handlerInfo.name, handlerInfo.listener); delete deferredTaskHandlers[taskId]; }); }); ======= >>>>>>> var deferredTaskHandlers = {}; var ready = false; OAE.on('ready', function() { ready = true; // Bind all the deferred task handlers now that the container is ready _.each(deferredTaskHandlers, function(handlerInfo, taskId) { bind(handlerInfo.name, handlerInfo.listener); delete deferredTaskHandlers[taskId]; }); }); <<<<<<< * @param {String} name The unique label that identifies the type of job this binding is listening to * @param {Function} listener The function that will handle tasks of the given type * @param {Object} listener.data The data that was sent in the job. This is different depending on the type of job * @param {Function} [callback] Invoked after the listener has been bound to the MQ * @param {Object} [callback.err] An error that occurred, if any ======= * @param {String} name The unique label that identifies the type of job this binding is listening to * @param {Function} listener The function that will handle tasks of the given type * @param {Object} listener.data The data that was sent in the job. This is different depending on the type of job * @param {Object} [options] A set of options that can override the default ones. * @param {Object} [options.queue] Holds the options that will override the `Constants.DEFAULT_TASK_QUEUE_OPTS` options. * @param {Object} [options.subscribe] Holds the options that will override the `Constants.DEFAULT_TASK_QUEUE_SUBSCRIBE_OPTS` options. * @param {Number} [options.prefetchCount] The maximum number of tasks that a listener should handle concurrently. * @param {Function} [callback] Invoked after the listener has been bound to the MQ * @param {Object} >>>>>>> * @param {String} name The unique label that identifies the type of job this binding is listening to * @param {Function} listener The function that will handle tasks of the given type * @param {Object} listener.data The data that was sent in the job. This is different depending on the type of job * @param {Object} [options] A set of options that can override the default ones. * @param {Object} [options.queue] Holds the options that will override the `Constants.DEFAULT_TASK_QUEUE_OPTS` options. * @param {Object} [options.subscribe] Holds the options that will override the `Constants.DEFAULT_TASK_QUEUE_SUBSCRIBE_OPTS` options. * @param {Number} [options.prefetchCount] The maximum number of tasks that a listener should handle concurrently. * @param {Function} [callback] Invoked after the listener has been bound to the MQ * @param {Object} [callback.err] An error that occurred, if any <<<<<<< // If the container is not ready to handle requests, defer the actual binding of these handlers until later if (!ready) { log().trace({'name': name}, 'Deferring registration of task handler until server is ready.'); deferredTaskHandlers[name] = {'name': name, 'listener': listener}; return callback(); } connection.queue(name, Constants.DEFAULT_TASK_QUEUE_OPTS, function(queue) { ======= // Create/get the queue. var queueOptions = _.defaults(options.queue, Constants.DEFAULT_TASK_QUEUE_OPTS); connection.queue(name, queueOptions, function(queue) { >>>>>>> // If the container is not ready to handle requests, defer the actual binding of these handlers until later if (!ready) { log().trace({'name': name}, 'Deferring registration of task handler until server is ready.'); deferredTaskHandlers[name] = {'name': name, 'listener': listener}; return callback(); } // Create/get the queue. var queueOptions = _.defaults(options.queue, Constants.DEFAULT_TASK_QUEUE_OPTS); connection.queue(name, queueOptions, function(queue) {
<<<<<<< * Create a new tenant with a tenant administrator user. * * @param {String} tenantAlias The tenant alias of the tenant to create * @param {String} tenantHost The host of the tenant to create * @param {Function} callback Invoked when the process completes * @param {Object} callback.err An error that occurred, if any * @param {Object} callback.tenant The tenant data object * @param {RestContext} callback.tenantAdminRestContext The rest context that can be used to make requests on behalf of the tenant administrator */ var createTenantWithAdmin = module.exports.createTenantWithAdmin = function(tenantAlias, tenantHost, callback) { var adminCtx = createGlobalAdminRestContext(); RestAPI.Tenant.createTenant(adminCtx, tenantAlias, tenantAlias, tenantHost, function(err, tenant) { if (err) { return callback(err); } // Disable recaptcha so we can create a user RestAPI.Config.updateConfig(adminCtx, tenantAlias, 'oae-principals/recaptcha/enabled', false, function(err) { if (err) { return callback(err); } // Create the user and make them admin var anonymousCtx = createTenantRestContext(tenantHost); RestAPI.User.createUser(anonymousCtx, 'administrator', 'administrator', 'Tenant Administrator', null, function(err, tenantAdmin) { if (err) { return callback(err); } RestAPI.User.setTenantAdmin(adminCtx, tenantAdmin.id, true, function(err) { if (err) { return callback(err); } // Re-enable captcha RestAPI.Config.updateConfig(adminCtx, tenantAlias, 'oae-principals/recaptcha/enabled', true, function(err) { if (err) { return callback(err); } return callback(null, tenant, createTenantAdminRestContext(tenantHost)); }); }); }); }); }); }; /** ======= * Create a group hierarchy, starting from the 0th group in the array as the highest level down to the last group as the lowest level. * * @param {Context} restCtx The context of the REST request * @param {String[]} groupIds An array of group IDs that describe the hierarchy to create. If there are 0 or 1 groupIds, this method effectively does nothing. If there are 2 groupIds, the group at groupId[1] becomes a member of groupId[0]. And so on. * @param {String} role The role to assign to the group membership * @param {Function} callback Standard callback method * @param {Object} callback.err An error that occurred, if any */ var generateGroupHierarchy = module.exports.generateGroupHierarchy = function(restCtx, groupIds, role, callback) { if (groupIds.length <= 1) { return callback(); } var membershipChanges = {}; membershipChanges[groupIds[1]] = role; RestAPI.Group.setGroupMembers(restCtx, groupIds[0], membershipChanges, function(err) { if (err) { return callback(err); } // Recurse, removing the first group generateGroupHierarchy(restCtx, groupIds.slice(1), role, callback); }); } /** >>>>>>> * Create a new tenant with a tenant administrator user. * * @param {String} tenantAlias The tenant alias of the tenant to create * @param {String} tenantHost The host of the tenant to create * @param {Function} callback Invoked when the process completes * @param {Object} callback.err An error that occurred, if any * @param {Object} callback.tenant The tenant data object * @param {RestContext} callback.tenantAdminRestContext The rest context that can be used to make requests on behalf of the tenant administrator */ var createTenantWithAdmin = module.exports.createTenantWithAdmin = function(tenantAlias, tenantHost, callback) { var adminCtx = createGlobalAdminRestContext(); RestAPI.Tenant.createTenant(adminCtx, tenantAlias, tenantAlias, tenantHost, function(err, tenant) { if (err) { return callback(err); } // Disable recaptcha so we can create a user RestAPI.Config.updateConfig(adminCtx, tenantAlias, 'oae-principals/recaptcha/enabled', false, function(err) { if (err) { return callback(err); } // Create the user and make them admin var anonymousCtx = createTenantRestContext(tenantHost); RestAPI.User.createUser(anonymousCtx, 'administrator', 'administrator', 'Tenant Administrator', null, function(err, tenantAdmin) { if (err) { return callback(err); } RestAPI.User.setTenantAdmin(adminCtx, tenantAdmin.id, true, function(err) { if (err) { return callback(err); } // Re-enable captcha RestAPI.Config.updateConfig(adminCtx, tenantAlias, 'oae-principals/recaptcha/enabled', true, function(err) { if (err) { return callback(err); } return callback(null, tenant, createTenantAdminRestContext(tenantHost)); }); }); }); }); }); }; /** * Create a group hierarchy, starting from the 0th group in the array as the highest level down to the last group as the lowest level. * * @param {Context} restCtx The context of the REST request * @param {String[]} groupIds An array of group IDs that describe the hierarchy to create. If there are 0 or 1 groupIds, this method effectively does nothing. If there are 2 groupIds, the group at groupId[1] becomes a member of groupId[0]. And so on. * @param {String} role The role to assign to the group membership * @param {Function} callback Standard callback method * @param {Object} callback.err An error that occurred, if any */ var generateGroupHierarchy = module.exports.generateGroupHierarchy = function(restCtx, groupIds, role, callback) { if (groupIds.length <= 1) { return callback(); } var membershipChanges = {}; membershipChanges[groupIds[1]] = role; RestAPI.Group.setGroupMembers(restCtx, groupIds[0], membershipChanges, function(err) { if (err) { return callback(err); } // Recurse, removing the first group generateGroupHierarchy(restCtx, groupIds.slice(1), role, callback); }); } /**
<<<<<<< var MessageBoxAPI = require('oae-messagebox'); var MessageBoxConstants = require('oae-messagebox/lib/constants').MessageBoxConstants; ======= var OaeUtil = require('oae-util/lib/util'); >>>>>>> var MessageBoxAPI = require('oae-messagebox'); var MessageBoxConstants = require('oae-messagebox/lib/constants').MessageBoxConstants; var OaeUtil = require('oae-util/lib/util');
<<<<<<< var rolesAPI = require('oae-roles'); var cassandra = require('oae-util/lib/cassandra'); var roleUtil = require('oae-roles/lib/util'); var permissionsAPI = require('oae-permissions/lib/api'); var PrincipalUtil = require('./util'); ======= var RolesAPI = require('oae-roles'); var Cassandra = require('oae-util/lib/cassandra'); var RolesUtil = require('oae-roles/lib/util'); var PermissionsAPI = require('oae-permissions/lib/api'); var Utils = require('./utils'); >>>>>>> var RolesAPI = require('oae-roles'); var Cassandra = require('oae-util/lib/cassandra'); var RolesUtil = require('oae-roles/lib/util'); var PermissionsAPI = require('oae-permissions/lib/api'); var PrincipalUtil = require('./util'); <<<<<<< if (!PrincipalUtil.isGroup(group_id)) { ======= if (!Utils.isGroup(group_id)) { >>>>>>> if (!PrincipalUtil.isGroup(group_id)) { <<<<<<< PrincipalUtil.getPrincipal(group_id, callback); ======= Utils.getPrincipal(group_id, callback); >>>>>>> PrincipalUtil.getPrincipal(group_id, callback); <<<<<<< PrincipalUtil.getBasicProfile(members, callback); ======= Utils.getBasicProfile(members, callback); >>>>>>> PrincipalUtil.getBasicProfile(members, callback); <<<<<<< PrincipalUtil.getPrincipal(principal_id, function(err) { ======= Utils.getPrincipal(principal_id, function(err) { >>>>>>> PrincipalUtil.getPrincipal(principal_id, function(err) { <<<<<<< if (retrieve_basicprofile) { PrincipalUtil.getBasicProfile(_.keys(groups), callback); ======= var groupsArray = _.keys(groups); if (retrieve_basicprofile && groupsArray.length > 0) { Utils.getBasicProfile(groupsArray, callback); >>>>>>> var groupsArray = _.keys(groups); if (retrieve_basicprofile && groupsArray.length > 0) { PrincipalUtil.getBasicProfile(groupsArray, callback); <<<<<<< PrincipalUtil.getPrincipal(memberUuid, function(err) { ======= Utils.getPrincipal(memberUuid, function(err) { >>>>>>> PrincipalUtil.getPrincipal(memberUuid, function(err) { <<<<<<< PrincipalUtil.explodePrincipals([group_id], true, function(err, users) { ======= Utils.explodePrincipals([group_id], true, function(err, users) { >>>>>>> PrincipalUtil.explodePrincipals([group_id], true, function(err, users) {
<<<<<<< _.keys(docsByType).forEach(function(type) { transformers[type](ctx, docsByType[type], _monitorTransformers); }); ======= for (var type in docsByType) { transformers[type](ctx, docsByType[type], (function(resourceType) { // We need to pass the resource type of this iteration on to the monitor return function(err, docs) { _monitorTransformers(err, resourceType, docs); }; })(type)); } >>>>>>> _.keys(docsByType).forEach(function(type) { transformers[type](ctx, docsByType[type], (function(resourceType) { // We need to pass the resource type of this iteration on to the monitor return function(err, docs) { _monitorTransformers(err, resourceType, docs); }; })(type)); }); <<<<<<< var data = null; ======= opts = opts || {}; >>>>>>> opts = opts || {}; var data = null; <<<<<<< * @return {Boolean} `true` if the value is a number, `false` otherwise. ======= * @return {Boolean} `true` if the value is a number, `false` otherwise. * @api private >>>>>>> * @return {Boolean} `true` if the value is a number, `false` otherwise. * @api private
<<<<<<< var opts = { 'visibility': req.body.visibility, 'email': req.body.email, 'emailPreference': req.body.emailPreference, 'locale': req.body.locale || req.ctx.locale(), 'publicAlias': req.body.publicAlias, 'acceptedTC': (req.body.acceptedTC === 'true') }; ======= >>>>>>>
<<<<<<< var data = null; ======= var validator = new Validator(); validator.check(null, new Error('createQuery expects a query object.')).isObject(query); if (validator.hasErrors()) { log().error({'err': validator.getFirstError()}, 'Invalid input provided to SearchUtil.createQuery'); throw validator.getFirstError(); } >>>>>>> var validator = new Validator(); validator.check(null, new Error('createQuery expects a query object.')).isObject(query); if (validator.hasErrors()) { log().error({'err': validator.getFirstError()}, 'Invalid input provided to SearchUtil.createQuery'); throw validator.getFirstError(); } var data = null;
<<<<<<< var _ = require('underscore'); ======= var TenantsAPI = require('oae-tenants'); >>>>>>> var _ = require('underscore'); var TenantsAPI = require('oae-tenants');
<<<<<<< ======= {verb: 'get', url: '/:index/_listCollections', controller: 'read', action: 'listCollections'}, {verb: 'get', url: '/:index/_listCollections/:type', controller: 'read', action: 'listCollections'}, {verb: 'get', url: '/:index/_autoRefresh', controller: 'admin', action: 'getAutoRefresh'}, {verb: 'get', url: '/:index/:collection/_mapping', controller: 'admin', action: 'getMapping'}, {verb: 'get', url: '/:index/:collection/_specifications', controller: 'admin', action: 'getSpecifications'}, {verb: 'post', url: '/_createFirstAdmin', controller: 'admin', action: 'createFirstAdmin'}, {verb: 'get', url: '/_adminExists', controller: 'admin', action: 'adminExists'}, >>>>>>> {verb: 'get', url: '/:index/_listCollections', controller: 'read', action: 'listCollections'}, {verb: 'get', url: '/:index/_listCollections/:type', controller: 'read', action: 'listCollections'}, {verb: 'get', url: '/:index/_autoRefresh', controller: 'admin', action: 'getAutoRefresh'}, {verb: 'get', url: '/:index/:collection/_mapping', controller: 'admin', action: 'getMapping'}, {verb: 'get', url: '/:index/:collection/_specifications', controller: 'admin', action: 'getSpecifications'}, <<<<<<< ======= {verb: 'post', url: '/_login', controller: 'auth', action: 'login'}, {verb: 'post', url: '/_checkToken', controller: 'auth', action: 'checkToken'}, {verb: 'post', url: '/_login/:strategy', controller: 'auth', action: 'login'}, {verb: 'post', url: '/_validateSpecifications', controller: 'admin', action: 'validateSpecifications'}, >>>>>>> <<<<<<< ======= {verb: 'put', url: '/_updateSelf', controller: 'auth', action: 'updateSelf'}, {verb: 'put', url: '/_specifications', controller: 'admin', action: 'updateSpecifications'}, >>>>>>>
<<<<<<< runningServers[tenant.port] = tenant.server runningServers[tenant.port].inMaintenanceMode = !tenant.active; ======= runningServers[tenant.port] = http.createServer(tenant.server); runningServers[tenant.port].listen(tenant.port); runningServers[tenant.port].disabled = !tenant.active; >>>>>>> runningServers[tenant.port] = tenant.server runningServers[tenant.port].disabled = !tenant.active;
<<<<<<< var simonRemoveChange = makeMembershipChange(simong, false); AuthzAPI.computeMemberRolesAfterChanges(groupId, simonRemoveChange, null, function(err, idChangeInfo) { ======= changes = _.oaeObj(simong, false); AuthzAPI.computeMemberRolesAfterChanges(groupId, changes, function(err, permissions, newMembers, updateMembers, removedMembers) { >>>>>>> var simonRemoveChange = _.oaeObj(simong, false); AuthzAPI.computeMemberRolesAfterChanges(groupId, simonRemoveChange, null, function(err, idChangeInfo) { <<<<<<< var unknownUserRemoveChange = makeMembershipChange(unknownUser, false); AuthzAPI.computeMemberRolesAfterChanges(groupId, unknownUserRemoveChange, null, function(err, idChangeInfo) { ======= changes = _.oaeObj(unknownUser, false); AuthzAPI.computeMemberRolesAfterChanges(groupId, changes, function(err, permissions, newMembers, updateMembers, removedMembers) { >>>>>>> var unknownUserRemoveChange = _.oaeObj(unknownUser, false); AuthzAPI.computeMemberRolesAfterChanges(groupId, unknownUserRemoveChange, null, function(err, idChangeInfo) {
<<<<<<< describe('Search Options', function() { /** * Test that verifies the resourceType parameter in the general search properly filter results by user, group and content. */ it('verify resourceType scope param', function(callback) { var jackUsername = TestsUtil.generateTestUserId('jack'); var groupAlias = TestsUtil.generateTestUserId('group'); // Ensure a user, group and content item exist in the search index to ensure they are not included in resource-scoped searches RestAPI.User.createUser(camAdminRestContext, jackUsername, 'password', 'Jack JickMackerson', null, function(err, jack) { assert.ok(!err); var jackCtx = TestsUtil.createTenantRestContext(global.oaeTests.tenants.cam.host, jackUsername, 'password'); RestAPI.Group.createGroup(camAdminRestContext, groupAlias, groupAlias, 'A really awesome group', 'public', 'no', [], [], function(err, group) { assert.ok(!err); RestAPI.Content.createLink(camAdminRestContext, 'Sakai Foundation', 'Link to Sakai Foundation Website', 'public', 'http://www.sakaifoundation.org', [], [], function(err, content) { assert.ok(!err); // Verify we only get users from a user search RestAPI.Search.search(jackCtx, 'general', ['user'], null, function(err, results) { assert.ok(!err); assert.ok(_getDocById(results, jack.id)); assert.equal(_.filter(results.results, function(result) { return result.resourceType === 'group' }).length, 0); assert.equal(_.filter(results.results, function(result) { return result.resourceType === 'content' }).length, 0); // Verify we only get groups from a group search RestAPI.Search.search(jackCtx, 'general', ['group'], null, function(err, results) { assert.ok(!err); assert.ok(_getDocById(results, group.id)); assert.equal(_.filter(results.results, function(result) { return result.resourceType === 'user' }).length, 0); assert.equal(_.filter(results.results, function(result) { return result.resourceType === 'content' }).length, 0); // Verify we only get content from a content search RestAPI.Search.search(jackCtx, 'general', ['content'], null, function(err, results) { assert.ok(!err); assert.ok(_getDocById(results, content.contentId)); assert.equal(_.filter(results.results, function(result) { return result.resourceType === 'user' }).length, 0); assert.equal(_.filter(results.results, function(result) { return result.resourceType === 'group' }).length, 0); callback(); }); }); }); }); }); }); }); /** * Test that verifies when includeIndirect is not specified, private resources by indirect access are returned in general search, and when * it is disabled, no indirect resources are returned in general search. */ it('verify includeIndirect option', function(callback) { var jackUsername = TestsUtil.generateTestUserId('jack'); var group1Alias = TestsUtil.generateTestUserId('group1'); var group2Alias = TestsUtil.generateTestUserId('group2'); // Create a group membership hierarchy: group2 -> group1 -> jack; to test indirect searches RestAPI.User.createUser(camAdminRestContext, jackUsername, 'password', 'Jack JickMackerson', null, function(err, jack) { assert.ok(!err); var jackCtx = TestsUtil.createTenantRestContext(global.oaeTests.tenants.cam.host, jackUsername, 'password'); RestAPI.Group.createGroup(camAdminRestContext, group1Alias, group1Alias, 'A really awesome group', 'private', 'no', [], [jack.id], function(err, group1) { assert.ok(!err); RestAPI.Group.createGroup(camAdminRestContext, group2Alias, group2Alias, 'A really awesome group', 'private', 'no', [], [group1.id], function(err, group2) { assert.ok(!err); // Search with jack while including indirect, to sanity check that the indirect group is returned RestAPI.Search.search(jackCtx, 'general', ['all'], {'q': 'awesome'}, function(err, results) { assert.ok(!err); // Verify that using default (includeIndirect === true), we get both groups assert.ok(_getDocById(results, group1.id)); assert.ok(_getDocById(results, group2.id)); // Search with jack *exluding* indirect groups, verify group2 is not returned RestAPI.Search.search(jackCtx, 'general', ['all'], {'q': 'awesome', 'includeIndirect': false}, function(err, results) { assert.ok(!err); // Verify that when includeIndirect is disabled, we don't get group2, which is indirectly associated to jack assert.ok(_getDocById(results, group1.id)); assert.ok(!_getDocById(results, group2.id)); callback(); }); }); }); }); }); }); }); ======= describe('Search Analysis', function() { /** * Verifies that the search index has a minimum edgengram of 3, so that autosuggest (show-as-you-type) functionality will work * reasonably well. */ it('verify edgengram analyzer of 3 for auto-suggest', function(callback) { RestAPI.Content.createLink(camAdminRestContext, 'Sakai Xyzforedgengram', 'Link to Sakai Foundation Website', 'public', 'http://www.sakaifoundation.org', [], [], function(err, content) { assert.ok(!err); // Search for just the first 3 characters to ensure it matches "Xyzforedgengram" RestAPI.Search.search(camAdminRestContext, 'general', ['all'], {'q': 'Xyz'}, function(err, results) { assert.ok(!err); assert.ok(_getDocById(results, content.contentId)); callback(); }); }); }); /** * Verifies that the search analyzer is not case-sensitive */ it('verify search indexing is not case-sensitive', function(callback) { RestAPI.Content.createLink(camAdminRestContext, 'Sakai Xyzforedgengram', 'Link to Sakai Foundation Website', 'public', 'http://www.sakaifoundation.org', [], [], function(err, content) { assert.ok(!err); // Search for just the first 3 characters to ensure it matches "Xyzforedgengram" RestAPI.Search.search(camAdminRestContext, 'general', ['all'], {'q': 'sakai'}, function(err, results) { assert.ok(!err); assert.ok(_getDocById(results, content.contentId)); callback(); }); }); }); }); >>>>>>> describe('Search Analysis', function() { /** * Verifies that the search index has a minimum edgengram of 3, so that autosuggest (show-as-you-type) functionality will work * reasonably well. */ it('verify edgengram analyzer of 3 for auto-suggest', function(callback) { RestAPI.Content.createLink(camAdminRestContext, 'Sakai Xyzforedgengram', 'Link to Sakai Foundation Website', 'public', 'http://www.sakaifoundation.org', [], [], function(err, content) { assert.ok(!err); // Search for just the first 3 characters to ensure it matches "Xyzforedgengram" RestAPI.Search.search(camAdminRestContext, 'general', ['all'], {'q': 'Xyz'}, function(err, results) { assert.ok(!err); assert.ok(_getDocById(results, content.contentId)); callback(); }); }); }); /** * Verifies that the search analyzer is not case-sensitive */ it('verify search indexing is not case-sensitive', function(callback) { RestAPI.Content.createLink(camAdminRestContext, 'Sakai Xyzforedgengram', 'Link to Sakai Foundation Website', 'public', 'http://www.sakaifoundation.org', [], [], function(err, content) { assert.ok(!err); // Search for just the first 3 characters to ensure it matches "Xyzforedgengram" RestAPI.Search.search(camAdminRestContext, 'general', ['all'], {'q': 'sakai'}, function(err, results) { assert.ok(!err); assert.ok(_getDocById(results, content.contentId)); callback(); }); }); }); }); describe('Search Options', function() { /** * Test that verifies the resourceType parameter in the general search properly filter results by user, group and content. */ it('verify resourceType scope param', function(callback) { var jackUsername = TestsUtil.generateTestUserId('jack'); var groupAlias = TestsUtil.generateTestUserId('group'); // Ensure a user, group and content item exist in the search index to ensure they are not included in resource-scoped searches RestAPI.User.createUser(camAdminRestContext, jackUsername, 'password', 'Jack JickMackerson', null, function(err, jack) { assert.ok(!err); var jackCtx = TestsUtil.createTenantRestContext(global.oaeTests.tenants.cam.host, jackUsername, 'password'); RestAPI.Group.createGroup(camAdminRestContext, groupAlias, groupAlias, 'A really awesome group', 'public', 'no', [], [], function(err, group) { assert.ok(!err); RestAPI.Content.createLink(camAdminRestContext, 'Sakai Foundation', 'Link to Sakai Foundation Website', 'public', 'http://www.sakaifoundation.org', [], [], function(err, content) { assert.ok(!err); // Verify we only get users from a user search RestAPI.Search.search(jackCtx, 'general', ['user'], null, function(err, results) { assert.ok(!err); assert.ok(_getDocById(results, jack.id)); assert.equal(_.filter(results.results, function(result) { return result.resourceType === 'group' }).length, 0); assert.equal(_.filter(results.results, function(result) { return result.resourceType === 'content' }).length, 0); // Verify we only get groups from a group search RestAPI.Search.search(jackCtx, 'general', ['group'], null, function(err, results) { assert.ok(!err); assert.ok(_getDocById(results, group.id)); assert.equal(_.filter(results.results, function(result) { return result.resourceType === 'user' }).length, 0); assert.equal(_.filter(results.results, function(result) { return result.resourceType === 'content' }).length, 0); // Verify we only get content from a content search RestAPI.Search.search(jackCtx, 'general', ['content'], null, function(err, results) { assert.ok(!err); assert.ok(_getDocById(results, content.contentId)); assert.equal(_.filter(results.results, function(result) { return result.resourceType === 'user' }).length, 0); assert.equal(_.filter(results.results, function(result) { return result.resourceType === 'group' }).length, 0); callback(); }); }); }); }); }); }); }); /** * Test that verifies when includeIndirect is not specified, private resources by indirect access are returned in general search, and when * it is disabled, no indirect resources are returned in general search. */ it('verify includeIndirect option', function(callback) { var jackUsername = TestsUtil.generateTestUserId('jack'); var group1Alias = TestsUtil.generateTestUserId('group1'); var group2Alias = TestsUtil.generateTestUserId('group2'); // Create a group membership hierarchy: group2 -> group1 -> jack; to test indirect searches RestAPI.User.createUser(camAdminRestContext, jackUsername, 'password', 'Jack JickMackerson', null, function(err, jack) { assert.ok(!err); var jackCtx = TestsUtil.createTenantRestContext(global.oaeTests.tenants.cam.host, jackUsername, 'password'); RestAPI.Group.createGroup(camAdminRestContext, group1Alias, group1Alias, 'A really awesome group', 'private', 'no', [], [jack.id], function(err, group1) { assert.ok(!err); RestAPI.Group.createGroup(camAdminRestContext, group2Alias, group2Alias, 'A really awesome group', 'private', 'no', [], [group1.id], function(err, group2) { assert.ok(!err); // Search with jack while including indirect, to sanity check that the indirect group is returned RestAPI.Search.search(jackCtx, 'general', ['all'], {'q': 'awesome'}, function(err, results) { assert.ok(!err); // Verify that using default (includeIndirect === true), we get both groups assert.ok(_getDocById(results, group1.id)); assert.ok(_getDocById(results, group2.id)); // Search with jack *exluding* indirect groups, verify group2 is not returned RestAPI.Search.search(jackCtx, 'general', ['all'], {'q': 'awesome', 'includeIndirect': false}, function(err, results) { assert.ok(!err); // Verify that when includeIndirect is disabled, we don't get group2, which is indirectly associated to jack assert.ok(_getDocById(results, group1.id)); assert.ok(!_getDocById(results, group2.id)); callback(); }); }); }); }); }); }); });
<<<<<<< var clone = require('clone'); ======= var csv = require('csv'); var events = require('events'); >>>>>>> var clone = require('clone'); var csv = require('csv'); var events = require('events'); <<<<<<< var AuthzConstants = require('oae-authz/lib/constants').AuthzConstants; ======= var AuthenticationConstants = require('oae-authentication/lib/constants').AuthenticationConstants; >>>>>>> var AuthenticationConstants = require('oae-authentication/lib/constants').AuthenticationConstants; var AuthzConstants = require('oae-authz/lib/constants').AuthzConstants; <<<<<<< validator.check(opts.visibility, {'code': 400, 'msg': 'The specified visibility setting is unknown.'}).isIn(_.values(AuthzConstants.visibility)); ======= validator.check(opts.visibility, {'code': 400, 'msg': 'The specified visibility setting is unknown'}).isIn(_.values(PrincipalsConstants.visibility)); >>>>>>> validator.check(opts.visibility, {'code': 400, 'msg': 'The specified visibility setting is unknown'}).isIn(_.values(AuthzConstants.visibility));
<<<<<<< var Fields = require('oae-config/lib/fields'); var cachedConfiguration = {}; Pubsub.on('oae-config', function(receivedMessage) { // Messages are of the form: // cam config updated // gt config updated var tenantId = receivedMessage.split(' ')[0]; getConfigFromCassandra(tenantId, function() {}); }); ======= var cachedConfiguration = {}; Pubsub.on('oae-config', function(receivedMessage) { // Messages are of the form: // cam config updated // gt config updated var tenantId = receivedMessage.split(' ')[0]; _getConfigFromCassandra(tenantId, function() {}); }); >>>>>>> var Fields = require('oae-config/lib/fields'); var cachedConfiguration = {}; Pubsub.on('oae-config', function(receivedMessage) { // Messages are of the form: // cam config updated // gt config updated var tenantId = receivedMessage.split(' ')[0]; _getConfigFromCassandra(tenantId, function() {}); }); <<<<<<< var mergeConfigIntoOriginal = function(config, modules, callback) { ======= var _mergeConfigIntoOriginal = function(config, modules, callback) { >>>>>>> var _mergeConfigIntoOriginal = function(config, modules, callback) { <<<<<<< var getConfigFromCassandra = function(tenantId, callback) { ======= var _getConfigFromCassandra = function(tenantId, callback) { >>>>>>> var _getConfigFromCassandra = function(tenantId, callback) { <<<<<<< /** * Reads the configuration values from cache or calls retrieveConfigFromCassandra and returns the configuration * @param {String} tenantId The ID of the tenant to get configuration for * @param {Function} callback Function executed after config has been read */ var getConfig = module.exports.getConfig = function(tenantId, callback) { var validator = new Validator(); validator.check(tenantId, {'code': 400, 'msg': 'Missing tenantid'}).notEmpty(); if (validator.hasErrors()) { return callback(validator.getFirstError()); } // If the tenant configuration is cached return it instead of querying the database if (cachedConfiguration[tenantId]) { return callback(false, cachedConfiguration[tenantId]); } else { getConfigFromCassandra(tenantId, callback); } }; ======= /** * Reads the configuration values from cache or calls retrieveConfigFromCassandra and returns the configuration * @param {String} tenantId The ID of the tenant to get configuration for * @param {Function} callback Function executed after config has been read */ var getConfig = module.exports.getConfig = function(tenantId, callback) { var validator = new Validator(); validator.check(tenantId, {'code': 400, 'msg': 'Missing tenantid'}).notEmpty(); if (validator.hasErrors()) { return callback(validator.getFirstError()); } // If the tenant configuration is cached return it instead of querying the database if (cachedConfiguration[tenantId]) { return callback(false, cachedConfiguration[tenantId]); } else { _getConfigFromCassandra(tenantId, callback); } }; >>>>>>> /** * Reads the configuration values from cache or calls retrieveConfigFromCassandra and returns the configuration * @param {String} tenantId The ID of the tenant to get configuration for * @param {Function} callback Function executed after config has been read */ var getConfig = module.exports.getConfig = function(tenantId, callback) { var validator = new Validator(); validator.check(tenantId, {'code': 400, 'msg': 'Missing tenantid'}).notEmpty(); if (validator.hasErrors()) { return callback(validator.getFirstError()); } // If the tenant configuration is cached return it instead of querying the database if (cachedConfiguration[tenantId]) { return callback(false, cachedConfiguration[tenantId]); } else { _getConfigFromCassandra(tenantId, callback); } }; <<<<<<< var done = modules.length; ======= var toDo = modules.length; var done = 0; >>>>>>> var toDo = modules.length; var done = 0; <<<<<<< done--; if (!done) { ======= done++; if (done === toDo) { >>>>>>> done++; if (done === toDo) {
<<<<<<< var GroupAPI = require('oae-principals/lib/api.group'); var PrincipalUtil = require('oae-principals/lib/utils'); ======= var PrincipalsUtil = require('oae-principals/lib/util'); >>>>>>> var GroupAPI = require('oae-principals/lib/api.group'); var PrincipalsUtil = require('oae-principals/lib/util'); <<<<<<< return new Content(row.colHash.tenant, row.colHash.contentId, row.colHash.visibility, row.colHash.name, row.colHash.description, row.colHash.contentType, row.colHash.lastModified); ======= var hash = Cassandra.rowToHash(row); return new Content(hash.tenant, hash.contentId, hash.visibility, hash.title, hash.description, hash.contentType, hash.lastModified); >>>>>>> var hash = Cassandra.rowToHash(row); return new Content(hash.tenant, hash.contentId, hash.visibility, hash.name, hash.description, hash.contentType, hash.lastModified);
<<<<<<< * @param {String} baseUrl The URL of the tenant on which the request is done. This should include the protocol (e.g. http://gt.oae.com) and should not have a trailing slash * @param {String} userId The user id (i.e., local "username") of the user performing the REST request. This should be null if the current user is anonymous. ======= * * @param {String} host The URL of the tenant on which the request is done. This should include the protocol (e.g. http://gt.oae.com) and should not have a trailing slash. * @param {String} userId The user id of the user performing the REST request. This should be null if the current user is anonymous. >>>>>>> * * @param {String} host The URL of the tenant on which the request is done. This should include the protocol (e.g. http://gt.oae.com) and should not have a trailing slash. * @param {String} userId The user id (i.e., local "username") of the user performing the REST request. This should be null if the current user is anonymous.
<<<<<<< var events = require('events'); ======= var fs = require('fs'); >>>>>>> var events = require('events'); var fs = require('fs'); <<<<<<< ======= // Cassandra always returns the key as a column so the _colCount will always be at least 1. // TODO: https://github.com/sakaiproject/Hilary/issues/251 if (rows[0].count <= 2) { return callback({'code': 404, 'msg': "Couldn't find content: " + contentId}, null); } var contentObj = _rowToContent(rows[0]); >>>>>>> <<<<<<< ======= >>>>>>> <<<<<<< emitter.emit(ContentConstants.events.CREATED_CONTENT, ctx, contentObj, additionalMembers); ======= >>>>>>> emitter.emit(ContentConstants.events.CREATED_CONTENT, ctx, contentObj, additionalMembers); <<<<<<< _canManage(ctx, contentObj, function(err, canManage) { ======= // It is a possible that a content item that is owned by a tenant has been switched from public to private, but a user outside the // tenant that was previously manager can still share. however, restrictions inside _shareContent will stop them from sharing with // users outside the private tenant. _canManage(ctx, contentId, function(err, canManage) { >>>>>>> // It is a possible that a content item that is owned by a tenant has been switched from public to private, but a user outside the // tenant that was previously manager can still share. however, restrictions inside _shareContent will stop them from sharing with // users outside the private tenant. _canManage(ctx, contentObj, function(err, canManage) { <<<<<<< * @param {Context} ctx Standard context object, representing the currently logged user and its tenant * @param {String} contentObj The content object we want to check ======= * @param {Context} ctx Standard context object, representing the currently logged in user and its tenant * @param {String} contentId The id of the content object we want to check >>>>>>> * @param {Context} ctx Standard context object, representing the currently logged in user and its tenant * @param {String} contentObj The content object we want to check <<<<<<< callback(null, contentObj); // If the content is visible to logged in people, I get access if I'm logged in } else if (contentObj.visibility === ContentConstants.visibility.LOGGEDIN) { if (ctx.user()) { callback(null, contentObj); } else { callback({'code': 401, 'msg': "You don't have access to this piece of content. Please try logging in"}); } // if the user is admin of the content's tenant, they have access } else if (ctx.user() && ctx.user().isAdmin(contentObj.tenant)) { callback(null, contentObj); ======= return callback(null, contentObj); // If the content is visible to logged in users, I get access if I'm logged in to the content's tenant } else if (contentObj.visibility === ContentConstants.visibility.LOGGEDIN && TenantsUtil.isLoggedIn(ctx, contentObj.tenant)) { return callback(null, contentObj); >>>>>>> return callback(null, contentObj); // If the content is visible to logged in people, I get access if I'm logged in } else if (contentObj.visibility === ContentConstants.visibility.LOGGEDIN && TenantsUtil.isLoggedIn(ctx, contentObj.tenant)) { return callback(null, contentObj); // if the user is admin of the content's tenant, they have access } else if (ctx.user() && ctx.user().isAdmin(contentObj.tenant)) { return callback(null, contentObj); <<<<<<< // Besides having access to the content the comment needs to be authored by the user // or the user needs to be a content manager. _canManage(ctx, contentObj, function(err, canManage) { ======= _getComment(ctx, commentId, function(err, comment) { >>>>>>> _getComment(ctx, commentId, function(err, comment) {
<<<<<<< 'credentials': { 'username': 'administrator', 'password': 'administrator' } ======= 'prefetchCount': 15 }; /** * `config.signing` * * Configuration namespace for the signing logic * FIXME: once https://github.com/sakaiproject/Hilary/issues/331 is addressed, this config can move to the Global Admin Config. * * @param {String} key This key will be used to sign URLs like profile pictures, content previews, etc.. . It's vital to the security of the system that you change this in production. */ config.signing = { 'key': 'The default signing key, please change me.' >>>>>>> 'credentials': { 'username': 'administrator', 'password': 'administrator' } }; /** * `config.signing` * * Configuration namespace for the signing logic * FIXME: once https://github.com/sakaiproject/Hilary/issues/331 is addressed, this config can move to the Global Admin Config. * * @param {String} key This key will be used to sign URLs like profile pictures, content previews, etc.. . It's vital to the security of the system that you change this in production. */ config.signing = { 'key': 'The default signing key, please change me.'
<<<<<<< /** * Verifies that paging the revisions of a piece of content works as expected. */ it('verify limiting revisions retrievals', function(callback) { setUpUsers(function(contexts) { // Create some content with a couple of revisions. RestAPI.Content.createFile(contexts['simon'].restContext, 'Test Content', 'Test content description', 'private', getFileStream, [], [], function(err, contentObj) { assert.ok(!err); assert.ok(contentObj); // Create ~30 revisions var createdRevisions = []; var createRevisions = function(callback) { RestAPI.Content.updateFileBody(contexts['simon'].restContext, contentObj.id, getSakaiLogoStream, function(err, revision) { assert.ok(!err); createdRevisions.push(revision); if (createdRevisions.length === 30) { return callback(createdRevisions); } else { createRevisions(callback); } }); }; createRevisions(function(createdRevisions) { // Try to get a negative amount of revisions, it should return 1 item RestAPI.Content.getRevisions(contexts['simon'].restContext, contentObj.id, null, -100, function(err, revisions) { assert.ok(!err); assert.equal(revisions.length, 1); // Fetching a 100 revisions should result in an upper bound of 25 RestAPI.Content.getRevisions(contexts['simon'].restContext, contentObj.id, null, 100, function(err, revisions) { assert.ok(!err); assert.equal(revisions.length, 25); // Assert paging. RestAPI.Content.getRevisions(contexts['simon'].restContext, contentObj.id, null, 5, function(err, firstPage) { assert.ok(!err); assert.equal(firstPage.length, 5); RestAPI.Content.getRevisions(contexts['simon'].restContext, contentObj.id, firstPage[4].created, 5, function(err, secondPage) { assert.ok(!err); assert.equal(secondPage.length, 5); // Ensure that there are no duplicates in the revision pages. _.each(secondPage, function(secondPageRevision) { _.each(firstPage, function(firstPageRevision) { assert.notEqual(firstPageRevision.revisionId, secondPageRevision.revisionId); }); }); callback(); }); }); }); }); }); }); }); }); ======= /** * Verifies that an older file can be restored. */ it('verify revision restoration', function(callback) { setUpUsers(function(contexts) { // Create some content with a couple of revisions. RestAPI.Content.createFile(contexts['simon'].restContext, 'Test Content 1', 'Test content description 1', 'private', getFileStream, [], [], function(err, contentObj) { assert.ok(!err); assert.ok(contentObj); RestAPI.Content.updateFileBody(contexts['simon'].restContext, contentObj.id, getSakaiLogoStream, function(err) { assert.ok(!err); // Get the revisions and restore the first one. RestAPI.Content.getRevisions(contexts['simon'].restContext, contentObj.id, null, null, function(err, revisions) { assert.ok(!err); // Get the url for the 'latest' version of the file var path = temp.path(); RestAPI.Content.download(contexts['simon'].restContext, contentObj.id, null, path, function(err, response) { assert.ok(!err); assert.equal(response.statusCode, 204); var url = response.headers['x-accel-redirect']; // Now restore the original file. RestAPI.Content.restoreRevision(contexts['simon'].restContext, contentObj.id, revisions[1].revisionId, function(err) { assert.ok(!err); // Get the url for the 'new latest' version of the file. RestAPI.Content.download(contexts['simon'].restContext, contentObj.id, null, path, function(err, response) { assert.ok(!err); assert.equal(response.statusCode, 204); var latestUrl = response.headers['x-accel-redirect']; assert.notEqual(url, latestUrl); callback(); }); }); }); }); }); }); }); }); >>>>>>> /** * Verifies that paging the revisions of a piece of content works as expected. */ it('verify limiting revisions retrievals', function(callback) { setUpUsers(function(contexts) { // Create some content with a couple of revisions. RestAPI.Content.createFile(contexts['simon'].restContext, 'Test Content', 'Test content description', 'private', getFileStream, [], [], function(err, contentObj) { assert.ok(!err); assert.ok(contentObj); // Create ~30 revisions var createdRevisions = []; var createRevisions = function(callback) { RestAPI.Content.updateFileBody(contexts['simon'].restContext, contentObj.id, getSakaiLogoStream, function(err, revision) { assert.ok(!err); createdRevisions.push(revision); if (createdRevisions.length === 30) { return callback(createdRevisions); } else { createRevisions(callback); } }); }; createRevisions(function(createdRevisions) { // Try to get a negative amount of revisions, it should return 1 item RestAPI.Content.getRevisions(contexts['simon'].restContext, contentObj.id, null, -100, function(err, revisions) { assert.ok(!err); assert.equal(revisions.length, 1); // Fetching a 100 revisions should result in an upper bound of 25 RestAPI.Content.getRevisions(contexts['simon'].restContext, contentObj.id, null, 100, function(err, revisions) { assert.ok(!err); assert.equal(revisions.length, 25); // Assert paging. RestAPI.Content.getRevisions(contexts['simon'].restContext, contentObj.id, null, 5, function(err, firstPage) { assert.ok(!err); assert.equal(firstPage.length, 5); RestAPI.Content.getRevisions(contexts['simon'].restContext, contentObj.id, firstPage[4].created, 5, function(err, secondPage) { assert.ok(!err); assert.equal(secondPage.length, 5); // Ensure that there are no duplicates in the revision pages. _.each(secondPage, function(secondPageRevision) { _.each(firstPage, function(firstPageRevision) { assert.notEqual(firstPageRevision.revisionId, secondPageRevision.revisionId); }); }); callback(); }); }); }); }); }); }); }); }); /** * Verifies that an older file can be restored. */ it('verify revision restoration', function(callback) { setUpUsers(function(contexts) { // Create some content with a couple of revisions. RestAPI.Content.createFile(contexts['simon'].restContext, 'Test Content 1', 'Test content description 1', 'private', getFileStream, [], [], function(err, contentObj) { assert.ok(!err); assert.ok(contentObj); RestAPI.Content.updateFileBody(contexts['simon'].restContext, contentObj.id, getSakaiLogoStream, function(err) { assert.ok(!err); // Get the revisions and restore the first one. RestAPI.Content.getRevisions(contexts['simon'].restContext, contentObj.id, null, null, function(err, revisions) { assert.ok(!err); // Get the url for the 'latest' version of the file var path = temp.path(); RestAPI.Content.download(contexts['simon'].restContext, contentObj.id, null, path, function(err, response) { assert.ok(!err); assert.equal(response.statusCode, 204); var url = response.headers['x-accel-redirect']; // Now restore the original file. RestAPI.Content.restoreRevision(contexts['simon'].restContext, contentObj.id, revisions[1].revisionId, function(err) { assert.ok(!err); // Get the url for the 'new latest' version of the file. RestAPI.Content.download(contexts['simon'].restContext, contentObj.id, null, path, function(err, response) { assert.ok(!err); assert.equal(response.statusCode, 204); var latestUrl = response.headers['x-accel-redirect']; assert.notEqual(url, latestUrl); callback(); }); }); }); }); }); }); }); }); <<<<<<< ======= >>>>>>>
<<<<<<< var initParams = utils.extend({}, self._initParams); initParams.migratorParams = self.parent; ======= var initParams = utils.pick( self.parent, [ 'config', 'dir', 'timeout', 'template', 'adapter', 'url', 'trace', 'silent' ] ); self.init(initParams, self._initParams); >>>>>>> var initParams = utils.extend({}, self._initParams); initParams.migratorParams = utils.pick( self.parent, [ 'config', 'dir', 'timeout', 'template', 'adapter', 'url', 'trace', 'silent' ] ); <<<<<<< self._initLogger(self.parent); ======= this._initLogger(params); >>>>>>> self._initLogger(self.parent);
<<<<<<< const filePath = getCurrentFilePath(editor); ======= const prettierOptions = getPrettierOptions(editor); >>>>>>> const filePath = getCurrentFilePath(editor); const prettierOptions = getPrettierOptions(editor); <<<<<<< filePath, ======= filePath: getCurrentFilePath(editor), fallbackPrettierOptions: prettierOptions, >>>>>>> filePath, fallbackPrettierOptions: prettierOptions, <<<<<<< const prettier = getPrettier(filePath); const prettierOptions = getPrettierOptions(editor); const editorConfigOptions = filePath ? getEditorConfigOptions(filePath) : null; return prettier.format(text, { ...prettierOptions, ...editorConfigOptions }); ======= const prettier = getPrettier(getCurrentFilePath(editor)); return prettier.format(text, prettierOptions); >>>>>>> const prettier = getPrettier(filePath); return prettier.format(text, prettierOptions);
<<<<<<< slides = document.querySelectorAll('.slide'), progress = document.querySelector('div.progress div'), ======= slides = [], progress = [], slideList = [], >>>>>>> slides = [], progress = [], <<<<<<< timing = 0, isHistoryApiSupported = !!(window.history && history.pushState), l = slides.length, i; ======= isHistoryApiSupported = !!(window.history && history.pushState); >>>>>>> isHistoryApiSupported = !!(window.history && history.pushState);
<<<<<<< // 1) numbers: input numbers // 2) threshold: initial sharing threshold // 3) senders: array of senders (people that initially share secrets) // 4) receivers: array of receivers (people that will receive the initial secrets) // Variants of this are reshare tests that test the resharing of an existing share with a different set of parties // and threshold. For this variant, the tests will additionally generate: // 5) reshare_threshold: new/reshare threshold // 6) reshare_holders: new/reshare holder parties ======= // 1) input numbers // 2) sharing threshold // 3) array of senders // 4) array of receivers var max = options.max || options.Zp; >>>>>>> // 1) input numbers // 2) sharing threshold // 3) array of senders // 4) array of receivers // // Variants of this are reshare tests that test the resharing of an existing share with a different set of parties // and threshold. For this variant, the tests will additionally generate: // 5) reshare_threshold: new/reshare threshold // 6) reshare_holders: new/reshare holder parties var max = options.max || options.Zp;
<<<<<<< initAnalytics, LoginBehavior ======= >>>>>>> initAnalytics, <<<<<<< init("1771472059772879", LoginBehavior.LoginBehaviorWeb); initAnalytics(); ======= init("1771472059772879"); >>>>>>> init("1771472059772879"); initAnalytics();
<<<<<<< * Check if the value is file. * * @param {Object} check * @return {Boolean} */ var isFile = function (check) { return check.constructor === File; }; /** ======= * Check if the value is an Array string. If so, then check the type of the items * * @param {Array} check * @param {String} key * @param {Object} object * @param {Object} configs * @return {Boolean} */ var isArray = function (check, key, object, configs) { if (!Array.isArray(check)) return false; var isArray = true; configs.forEach(function (config) { if (config.hasOwnProperty('items')) { check.forEach(function(elem) { isArray = isArray && TYPES[config.items](elem, key, object, configs); }); } }); return isArray; }; /** >>>>>>> * Check if the value is file. * * @param {Object} check * @return {Boolean} */ var isFile = function (check) { return check.constructor === File; }; /** * Check if the value is an Array string. If so, then check the type of the items * * @param {Array} check * @param {String} key * @param {Object} object * @param {Object} configs * @return {Boolean} */ var isArray = function (check, key, object, configs) { if (!Array.isArray(check)) return false; var isArray = true; configs.forEach(function (config) { if (config.hasOwnProperty('items')) { check.forEach(function(elem) { isArray = isArray && TYPES[config.items](elem, key, object, configs); }); } }); return isArray; }; /** <<<<<<< * Check if a file type is included in values. * * @param {Array<String>} values * @return {Function} */ var isValidFileTypes = function (values) { return function (check) { check = check.toLowerCase(); var checkInValue = values.find(function (value) { return value.toLowerCase() === check }); return checkInValue ? true : false; } }; /** ======= * Check array is not smaller than a minimum length. * * @param {Number} min * @return {Function} */ var hasMinimumItems = function (min) { return function (check) { return check.length >= min; }; }; /** * Check array does not exceed a maximum length. * * @param {Number} max * @return {Function} */ var hasMaximumItems = function (max) { return function (check) { return check.length <= max; }; }; /** * Check array has unique items. * * @param {Boolean} checkUniqueness * @return {Function} */ var hasUniqueItems = function (checkUniqueness) { return function(check) { if (!checkUniqueness) return true; var unique = {}, i; for (i = 0; i < check.length; i += 1) { if (unique[check[i]]) { return false; } unique[check[i]] = true; } return true; }; }; /** >>>>>>> * Check if a file type is included in values. * * @param {Array<String>} values * @return {Function} */ var isValidFileTypes = function (values) { return function (check) { check = check.toLowerCase(); var checkInValue = values.find(function (value) { return value.toLowerCase() === check }); return checkInValue ? true : false; } }; /** * Check array is not smaller than a minimum length. * * @param {Number} min * @return {Function} */ var hasMinimumItems = function (min) { return function (check) { return check.length >= min; }; }; /** * Check array does not exceed a maximum length. * * @param {Number} max * @return {Function} */ var hasMaximumItems = function (max) { return function (check) { return check.length <= max; }; }; /** * Check array has unique items. * * @param {Boolean} checkUniqueness * @return {Function} */ var hasUniqueItems = function (checkUniqueness) { return function(check) { if (!checkUniqueness) return true; var unique = {}, i; for (i = 0; i < check.length; i += 1) { if (unique[check[i]]) { return false; } unique[check[i]] = true; } return true; }; }; /** <<<<<<< union: isUnion, file: isFile ======= union: isUnion, array: isArray >>>>>>> union: isUnion, array: isArray, file: isFile <<<<<<< pattern: isPattern, fileTypes: isValidFileTypes ======= pattern: isPattern, minItems: hasMinimumItems, maxItems: hasMaximumItems, uniqueItems: hasUniqueItems >>>>>>> pattern: isPattern, minItems: hasMinimumItems, maxItems: hasMaximumItems, uniqueItems: hasUniqueItems, fileTypes: isValidFileTypes
<<<<<<< $scope.generateKey = function(base, method) { return base + ':' + method.method; }; function hasUriParameters() { return $scope.resource.pathSegments.some(function(segment) { return segment.templated; }); } function hasParameters() { return !!(hasUriParameters() || $scope.method.queryParameters || !RAML.Utils.isEmpty($scope.method.headers.plain) || hasFormParameters($scope.method)); } this.hasRequestDocumentation = function() { return !!$scope.method.description || hasParameters() || !RAML.Utils.isEmpty($scope.method.body); }; this.hasResponseDocumentation = function() { return !RAML.Utils.isEmpty($scope.method.responses); }; ======= $scope.generateKey = function() { return $scope.resourceView.resourceKey() + ':' + $scope.method.method; }; function hasUriParameters() { return $scope.resource.pathSegments.some(function(segment) { return segment.templated; }); } function hasParameters() { return !!(hasUriParameters() || $scope.method.queryParameters || !RAML.Utils.isEmpty($scope.method.headers.plain) || hasFormParameters($scope.method)); } function hasTraits(method) { return method.is && method.is.length > 0; } this.hasRequestDocumentation = function() { return hasTraits($scope.method) || !!$scope.method.description || hasParameters() || !RAML.Utils.isEmpty($scope.method.body); }; this.hasResponseDocumentation = function() { return !RAML.Utils.isEmpty($scope.method.responses); }; >>>>>>> $scope.generateKey = function(base, method) { return base + ':' + method.method; }; function hasUriParameters() { return $scope.resource.pathSegments.some(function(segment) { return segment.templated; }); } function hasParameters() { return !!(hasUriParameters() || $scope.method.queryParameters || !RAML.Utils.isEmpty($scope.method.headers.plain) || hasFormParameters($scope.method)); } function hasTraits(method) { return method.is && method.is.length > 0; } this.hasRequestDocumentation = function() { return hasTraits($scope.method) || !!$scope.method.description || hasParameters() || !RAML.Utils.isEmpty($scope.method.body); }; this.hasResponseDocumentation = function() { return !RAML.Utils.isEmpty($scope.method.responses); };
<<<<<<< ======= } else { deferred.resolve(roomId); >>>>>>> <<<<<<< var deferred = q.defer(); this.kuzzle.clusterManager.broadcast([{hcDel: { c: connection.id, r: roomId }}]); ======= >>>>>>> this.kuzzle.clusterManager.broadcast([{hcDel: { c: connection.id, r: roomId }}]);
<<<<<<< (function() { 'use strict'; RAML.Directives.toggle = function() { ======= RAML.Directives.consoleTabset = function() { >>>>>>> (function() { 'use strict'; RAML.Directives.toggle = function() { <<<<<<< module.directive('tab', RAML.Directives.tab); module.directive('tabset', RAML.Directives.tabset); module.directive('subtabs', RAML.Directives.subtabs); module.directive('uriBar', RAML.Directives.uriBar); module.directive('toggle', RAML.Directives.toggle); module.directive('toggleItem', RAML.Directives.toggleItem); ======= module.directive('consoleTab', RAML.Directives.consoleTab); //<- prepend 'console' to avoid collision w/angular-bootstrap tab module.directive('consoleTabset', RAML.Directives.consoleTabset); //<- prepend 'console' to avoid collision w/angular-bootstrap tabset >>>>>>> module.directive('consoleTab', RAML.Directives.consoleTab); module.directive('consoleTabset', RAML.Directives.consoleTabset); module.directive('subtabs', RAML.Directives.subtabs); module.directive('uriBar', RAML.Directives.uriBar); module.directive('toggle', RAML.Directives.toggle); module.directive('toggleItem', RAML.Directives.toggleItem); <<<<<<< " </tab>\n" + "\n" + " <tab role=\"try-it\" heading=\"Try It\" active=\"documentation.tryItActive\" disabled=\"!ramlConsole.tryItEnabled()\">\n" + ======= " </console-tab>\n" + " <console-tab role=\"try-it\" heading=\"Try It\" active=\"documentation.tryItActive\" disabled=\"!ramlConsole.tryItEnabled()\">\n" + >>>>>>> " </console-tab>\n" + "\n" + " <console-tab role=\"try-it\" heading=\"Try It\" active=\"documentation.tryItActive\" disabled=\"!ramlConsole.tryItEnabled()\">\n" +
<<<<<<< module.directive('ramlConsoleInitializer', RAML.Directives.ramlConsoleInitializer); module.controller('TryItController', RAML.Controllers.TryIt); ======= module.directive('ramlConsoleInitializer', RAML.Directives.ramlConsoleInitializer); module.directive('parameterTable', RAML.Directives.parameterTable); module.filter('yesNo', RAML.Filters.yesNo); >>>>>>> module.directive('ramlConsoleInitializer', RAML.Directives.ramlConsoleInitializer); module.directive('parameterTable', RAML.Directives.parameterTable); module.controller('TryItController', RAML.Controllers.TryIt); module.filter('yesNo', RAML.Filters.yesNo);
<<<<<<< return typeof definition['enum'] === 'undefined' && definition.type !== 'boolean' && !$scope.isFile(definition); }; $scope.isEnum = function (definition) { return typeof definition['enum'] !== 'undefined'; ======= return !$scope.isEnum(definition) && definition.type !== 'boolean'; >>>>>>> return !$scope.isEnum(definition) && definition.type !== 'boolean' && !$scope.isFile(definition);
<<<<<<< ======= $templateCache.put('views/path_builder.tmpl.html', "<span role=\"path\" class=\"path\">\n" + " <span clsas=\"segment\">\n" + " <span ng-repeat='token in api.baseUri.tokens track by $index'>\n" + " <span ng-if='api.baseUri.parameters[token]'>\n" + " <parameter-field name='token' definition='api.baseUri.parameters[token]' model='pathBuilder.baseUriContext[token]'></parameter-field>\n" + " </span>\n" + " <span class=\"segment\" ng-if=\"!api.baseUri.parameters[token]\">{{token}}</span>\n" + " </span>\n" + " <span role='segment' ng-repeat='segment in resource.pathSegments' ng-init=\"$segmentIndex = $index\">\n" + " <span ng-repeat='token in segment.tokens track by $index'>\n" + " <span ng-if='segment.parameters[token]'>\n" + " <parameter-field name='token' definition='segment.parameters[token]' model='pathBuilder.segmentContexts[$segmentIndex][token]'></parameter-field>\n" + " </span>\n" + " <span class=\"segment\" ng-if=\"!segment.parameters[token]\">{{token}}</span>\n" + " </span>\n" + " </span>\n" + "</span>\n" ); >>>>>>>
<<<<<<< if (RAML.Settings.proxy) { url = RAML.Settings.proxy + url; } var requestOptions = { url: url, type: this.httpMethod, headers: {} } ======= var request = this.client.createRequest(url, this.httpMethod); >>>>>>> if (RAML.Settings.proxy) { url = RAML.Settings.proxy + url; } var request = this.client.createRequest(url, this.httpMethod);
<<<<<<< router.route('/api/auth').get(user.getCurrent)["delete"](user.logout); ======= router.route('/api/auth').get(user.getCurrent).post(user.loginHandler)["delete"](user.logout); router.route('/api/players').get(players.getPlayers).post(players.addPlayer); router.route('/api/players/:id').get(players.getPlayers).patch(players.updatePlayer)["delete"](players.deletePlayer); router.route('/api/players/avatar/:id').get(players.getAvatarFile); router.route('/api/players/avatar/steamid/:steamid').get(players.getAvatarURLBySteamID); router.route('/api/teams').get(teams.getTeams).post(teams.addTeam); router.route('/api/teams/:id').get(teams.getTeam).patch(teams.updateTeam)["delete"](teams.deleteTeam); router.route('/api/teams/logo/:id').get(teams.getLogoFile); >>>>>>> router.route('/api/auth').get(user.getCurrent).post(user.loginHandler)["delete"](user.logout); <<<<<<< router.route('/hud/:dir/').get(huds.renderOverlay()); router.route('/development/').get(huds.renderOverlay(true)); router.use('/dev', huds.verifyOverlay, http_proxy_middleware_1.createProxyMiddleware({ target: 'http://localhost:3500', ws: true, logLevel: 'silent' })); router.route('/api/machine').get(machine.getMachineId); ======= router.route('/hud/:dir/').get(huds.renderOverlay); router.route('/api/machine').get(machine.getMachineIdRoute); >>>>>>> router.route('/hud/:dir/').get(huds.renderOverlay()); router.route('/development/').get(huds.renderOverlay(true)); router.use('/dev', huds.verifyOverlay, http_proxy_middleware_1.createProxyMiddleware({ target: 'http://localhost:3500', ws: true, logLevel: 'silent' })); router.route('/api/machine').get(machine.getMachineIdRoute);
<<<<<<< ApiRT.prototype.checkToken = function (token) { return this.send({ controller: 'auth', action: 'checkToken', body: {token} }); }; ======= ApiRT.prototype.createUser = function (body, id) { var msg = { controller: 'security', action: 'createUser', body: body }; if (id !== undefined) { msg._id = id; } return this.send(msg); }; >>>>>>> ApiRT.prototype.createUser = function (body, id) { var msg = { controller: 'security', action: 'createUser', body: body }; if (id !== undefined) { msg._id = id; } return this.send(msg); }; ApiRT.prototype.checkToken = function (token) { return this.send({ controller: 'auth', action: 'checkToken', body: {token} }); };
<<<<<<< _locales: ['en', 'ar', 'cz', 'de', 'es', 'fr', 'hu', 'it', 'ja', 'nb', 'pl', 'pt-BR', 'ru', 'sk', 'sv', 'th', 'zh', 'zh-TW'], ======= _locales: ['en', 'ar', 'cz', 'de', 'es', 'fr', 'hu', 'it', 'ja', 'nb', 'nl', 'pl', 'pt-BR', 'ru', 'sk', 'sv', 'zh'], >>>>>>> _locales: ['en', 'ar', 'cz', 'de', 'es', 'fr', 'hu', 'it', 'ja', 'nb', 'nl', 'pl', 'pt-BR', 'ru', 'sk', 'sv', 'th', 'zh', 'zh-TW'],
<<<<<<< _locales: ['en', 'ar', 'cz', 'de', 'es', 'fr', 'hu', 'it', 'ja', 'no', 'pl', 'pt-BR', 'ru', 'sk', 'sv', 'zh'], ======= _locales: ['en', 'cz', 'de', 'es', 'fr', 'hu', 'it', 'ja', 'nb', 'pl', 'pt-BR', 'ru', 'sk', 'sv', 'zh'], >>>>>>> _locales: ['en', 'ar', 'cz', 'de', 'es', 'fr', 'hu', 'it', 'ja', 'nb', 'pl', 'pt-BR', 'ru', 'sk', 'sv', 'zh'], <<<<<<< ======= patternGroups: { en: '{{#def.n}}should have {{=e.params.reason}} {{=n}} propert{{#def.propPlural}} matching pattern "{{=e.params.pattern}}"', cz: '{{#def.n}}musí mýt {{=e.params.reason}} {{=n}} polož{{#def.propPlural}} vyhovující regulárnímu výrazu "{{=e.params.pattern}}"', de: '{{#def.n}}sollte {{=e.params.reason}} {{=n}} Attribut{{#def.propPlural}} nach folgendem Muster haben "{{=e.params.pattern}}"', es: '{{#def.n}}debe tener {{=e.params.reason}} {{=n}} propiedad{{#def.propPlural}} coincidente{{#def.mPlural}} con el patrón "{{=e.params.pattern}}"', fr: '{{#def.n}}doit avoir {{=e.params.reason}} {{=n}} propriété{{#def.propPlural}} correspondant au format "{{=e.params.pattern}}"', nb: '{{#def.n}}må ha {{=e.params.reason}} {{=n}} egenskap{{#def.mPlural}} som samsvarer med mønsteret "{{=e.params.pattern}}"', pl: '{{#def.n}}powinien mieć {{=e.params.reason}} {{=n}} pol{{#def.propPlural}} pasujące do wzorca "{{=e.params.pattern}}"', 'pt-BR': '{{#def.n}}deve ter {{=e.params.reason}} {{=n}} propriedade{{# def.propPlural}} padrão de correspondência "{{=e.params.pattern}}"', ru: '{{#def.n}}должно иметь {{=e.params.reason}} {{=n}} пол{{#def.propPlural}}, соответствующих образцу "{{=e.params.pattern}}"', sk: '{{#def.n}}musí mať {{=e.params.reason}} {{=n}} polož{{#def.propPlural}} splňjúcu regulárny výraz "{{=e.params.pattern}}"', sv: '{{#def.n}}bör ha {{=e.params.reason}} {{=n}} egenskap{{#def.propPlural}} som matchar mönstret "{{=e.params.pattern}}"', zh: '{{#def.n}}应当有 {{=n}} 个 {{=e.params.reason}} 属性满足模式 {{=e.params.pattern}}' }, >>>>>>> <<<<<<< en: 'should pass "switch" keyword validation, case {{=e.params.caseIndex}} fails', ar: 'يجب أن تمرر كلمة التحقق المفتاحية "switch"، الحالة {{=e.params.caseIndex}} خاطئة', cz: 'musí projít validácí "switch", případ {{=e.params.caseIndex}} je neúspěšný', de: 'sollte der "switch" Validierung entsprechen, der Fall {{=e.params.caseIndex}} schlägt fehl', es: 'debe pasar la validación "switch" de palabra clave, el caso {{=e.params.caseIndex}} falló', fr: 'doit être valide selon le critère "switch":validation par mot-clé, le cas {{=e.params.caseIndex}} est invalide', no: 'må passere "switch" validering, tilfellet {{=e.params.caseIndex}} misslykkes', pl: 'powinien przejść walidacje pola "switch", przypadek {{=e.params.caseIndex}} zawiódł', 'pt-BR': 'deve passar a validação "switch" de palavra-chave, o caso {{=e.params.caseIndex}} falha', ======= en: 'should pass \"switch\" keyword validation, case {{=e.params.caseIndex}} fails', cz: 'musí projít validácí \"switch\", případ {{=e.params.caseIndex}} je neúspěšný', de: 'sollte der \"switch\" Validierung entsprechen, der Fall {{=e.params.caseIndex}} schlägt fehl', es: 'debe pasar la validación \"switch\" de palabra clave, el caso {{=e.params.caseIndex}} falló', fr: 'doit être valide selon le critère \"switch\":validation par mot-clé, le cas {{=e.params.caseIndex}} est invalide', nb: 'må passere \"switch\" validering, tilfellet {{=e.params.caseIndex}} misslykkes', pl: 'powinien przejść walidacje pola \"switch\", przypadek {{=e.params.caseIndex}} zawiódł', 'pt-BR': 'deve passar a validação \"switch\" de palavra-chave, o caso {{=e.params.caseIndex}} falha', >>>>>>> en: 'should pass "switch" keyword validation, case {{=e.params.caseIndex}} fails', ar: 'يجب أن تمرر كلمة التحقق المفتاحية "switch"، الحالة {{=e.params.caseIndex}} خاطئة', cz: 'musí projít validácí "switch", případ {{=e.params.caseIndex}} je neúspěšný', de: 'sollte der "switch" Validierung entsprechen, der Fall {{=e.params.caseIndex}} schlägt fehl', es: 'debe pasar la validación "switch" de palabra clave, el caso {{=e.params.caseIndex}} falló', fr: 'doit être valide selon le critère "switch":validation par mot-clé, le cas {{=e.params.caseIndex}} est invalide', nb: 'må passere "switch" validering, tilfellet {{=e.params.caseIndex}} misslykkes', pl: 'powinien przejść walidacje pola "switch", przypadek {{=e.params.caseIndex}} zawiódł', 'pt-BR': 'deve passar a validação "switch" de palavra-chave, o caso {{=e.params.caseIndex}} falha',
<<<<<<< ca: '{{? n!=1 }}s{{?}}', cz: '{{? n==1 }}ek{{??}}ků{{?}}', ======= cz: '{{? n>=2 && n<=4 }}ky{{?? n!=1 }}ek{{??}}ků{{?}}', >>>>>>> ca: '{{? n!=1 }}s{{?}}', cz: '{{? n>=2 && n<=4 }}ky{{?? n!=1 }}ek{{??}}ků{{?}}', <<<<<<< ca: '{{#def.n}}ha de contenir la propietat{{#def.propPlural}} {{=e.params.deps}} quan la propietat {{=e.params.property}} és present', cz: '{{#def.n}} musí mít polož{{#def.propPlural}}: {{=e.params.deps}}, pokud obsahuje {{=e.params.property}}', ======= cz: '{{#def.n}}musí mít polož{{#def.propPlural}}: {{=e.params.deps}}, pokud obsahuje {{=e.params.property}}', >>>>>>> ca: '{{#def.n}}ha de contenir la propietat{{#def.propPlural}} {{=e.params.deps}} quan la propietat {{=e.params.property}} és present', cz: '{{#def.n}}musí mít polož{{#def.propPlural}}: {{=e.params.deps}}, pokud obsahuje {{=e.params.property}}', <<<<<<< ca: 'ha de ser igual a un dels valors predefinits', cz: 'musí být rovna jedné hodnotě z výčtu', ======= cz: 'musí být rovno jedné hodnotě z výčtu', >>>>>>> ca: 'ha de ser igual a un dels valors predefinits', cz: 'musí být rovno jedné hodnotě z výčtu', <<<<<<< ca: '{{#def.n}}no pot contenir més de {{=n}} caràcter{{#def.mPlural}}', cz: '{{#def.n}}nesmí být delší než {{=n}} znak{{? n!=1 }}ů{{?}}', ======= cz: '{{#def.n}}nesmí být delší než {{=n}} zna{{? n>=2 && n<=4 }}ky{{?? n!=1 }}k{{??}}ků{{?}}', >>>>>>> ca: '{{#def.n}}no pot contenir més de {{=n}} caràcter{{#def.mPlural}}', cz: '{{#def.n}}nesmí být delší než {{=n}} zna{{? n>=2 && n<=4 }}ky{{?? n!=1 }}k{{??}}ků{{?}}', <<<<<<< ca: '{{#def.n}}no pot contenir menys de {{=n}} caràcter{{#def.mPlural}}', cz: '{{#def.n}}nesmí být kratší než {{=n}} znak{{? n!=1 }}ů{{?}}', ======= cz: '{{#def.n}}nesmí být kratší než {{=n}} zna{{? n>=2 && n<=4 }}ky{{?? n!=1 }}k{{??}}ků{{?}}', >>>>>>> ca: '{{#def.n}}no pot contenir menys de {{=n}} caràcter{{#def.mPlural}}', cz: '{{#def.n}}nesmí být kratší než {{=n}} zna{{? n>=2 && n<=4 }}ky{{?? n!=1 }}k{{??}}ků{{?}}', <<<<<<< ca: 'no ha de tenir ítems duplicats (els ítems ## {{=e.params.j}} i {{=e.params.i}} són idèntics)', cz: 'nesmí obsahovat duplicitní prvky (prvky ## {{=e.params.j}} a {{=e.params.i}} jsou stejné)', ======= cz: 'nesmí obsahovat duplicitní prvky (prvky ## {{=e.params.j}} a {{=e.params.i}} jsou identické)', >>>>>>> ca: 'no ha de tenir ítems duplicats (els ítems ## {{=e.params.j}} i {{=e.params.i}} són idèntics)', cz: 'nesmí obsahovat duplicitní prvky (prvky ## {{=e.params.j}} a {{=e.params.i}} jsou identické)', <<<<<<< ca: 'la propietat \'{{=e.params.propertyName}}\' no és vàlida', cz: 'název položky \'{{=e.params.propertyName}}\' neodpovídá schématu', ======= cz: 'název položky \'{{=e.params.propertyName}}\' není platný', >>>>>>> ca: 'la propietat \'{{=e.params.propertyName}}\' no és vàlida', cz: 'název položky \'{{=e.params.propertyName}}\' není platný', <<<<<<< ca: 'ha de passar la validació "switch", el cas {{=e.params.caseIndex}} falla', cz: 'musí projít validácí "switch", případ {{=e.params.caseIndex}} je neúspěšný', ======= cz: 'musí projít validací "switch", případ {{=e.params.caseIndex}} je neúspěšný', >>>>>>> ca: 'ha de passar la validació "switch", el cas {{=e.params.caseIndex}} falla', cz: 'musí projít validací "switch", případ {{=e.params.caseIndex}} je neúspěšný', <<<<<<< ca: 'ha de ser igual a la constant', cz: 'musí být konstantní', ======= cz: 'musí být roven konstantě', >>>>>>> ca: 'ha de ser igual a la constant', cz: 'musí být roven konstantě', <<<<<<< ca: 'ha de correspondre’s amb l’esquema "{{=e.params.failingKeyword}}"', ======= cz: 'musí vyhovět "{{=e.params.failingKeyword}}" schématu', >>>>>>> ca: 'ha de correspondre’s amb l’esquema "{{=e.params.failingKeyword}}"', cz: 'musí vyhovět "{{=e.params.failingKeyword}}" schématu',
<<<<<<< _locales: ['en', 'ar', 'cz', 'de', 'es', 'fr', 'hu', 'it', 'ja', 'nb', 'pl', 'pt-BR', 'ru', 'sk', 'sv', 'zh', 'zh-TW'], ======= _locales: ['en', 'ar', 'cz', 'de', 'es', 'fr', 'hu', 'it', 'ja', 'nb', 'pl', 'pt-BR', 'ru', 'sk', 'sv', 'th', 'zh'], >>>>>>> _locales: ['en', 'ar', 'cz', 'de', 'es', 'fr', 'hu', 'it', 'ja', 'nb', 'pl', 'pt-BR', 'ru', 'sk', 'sv', 'th', 'zh', 'zh-TW'], <<<<<<< zh: '布尔模式出错', 'zh-TW': '布林模式不正確' ======= th: 'schema เป็น false', zh: '布尔模式出错' >>>>>>> th: 'schema เป็น false', zh: '布尔模式出错', 'zh-TW': '布林模式不正確' <<<<<<< zh: '无法找到引用{{=e.params.ref}}', 'zh-TW': '無法找到引用{{=e.params.ref}}' ======= th: 'ไม่สามารถหา reference {{=e.params.ref}}', zh: '无法找到引用{{=e.params.ref}}' >>>>>>> th: 'ไม่สามารถหา reference {{=e.params.ref}}', zh: '无法找到引用{{=e.params.ref}}', 'zh-TW': '無法找到引用{{=e.params.ref}}' <<<<<<< zh: '{{#def.n}}不允许超过{{=n}}个元素', 'zh-TW': '{{#def.n}}不可以超過{{=n}}個元素' ======= th: '{{#def.n}}ควรมีสมาชิกไม่เกิน {{=n}}', zh: '{{#def.n}}不允许超过{{=n}}个元素' >>>>>>> th: '{{#def.n}}ควรมีสมาชิกไม่เกิน {{=n}}', zh: '{{#def.n}}不允许超过{{=n}}个元素', 'zh-TW': '{{#def.n}}不可以超過{{=n}}個元素' <<<<<<< zh: '不允许有额外的属性', 'zh-TW': '不可以有額外的屬性' ======= th: 'ไม่ควรมี property เกินที่กำหนดไว้', zh: '不允许有额外的属性' >>>>>>> th: 'ไม่ควรมี property เกินที่กำหนดไว้', zh: '不允许有额外的属性', 'zh-TW': '不可以有額外的屬性' <<<<<<< zh: '数据应为 anyOf 所指定的其中一个', 'zh-TW': '不符合 anyOf 指定的模式' ======= th: 'ควรมี schema บางอย่างตรงกับที่กำหนดไว้ใน "anyOf"', zh: '数据应为 anyOf 所指定的其中一个' >>>>>>> th: 'ควรมี schema บางอย่างตรงกับที่กำหนดไว้ใน "anyOf"', zh: '数据应为 anyOf 所指定的其中一个', 'zh-TW': '不符合 anyOf 指定的模式' <<<<<<< zh: '{{#def.n}}应当拥有属性{{=e.params.property}}的依赖属性{{=e.params.deps}}', 'zh-TW': '{{#def.n}}應該要有屬性{{=e.params.property}}的依賴屬性{{=e.params.deps}}' ======= th: '{{#def.n}}เมื่อมี property {{=e.params.property}} แล้วก็ควรมี property {{=e.params.deps}} ด้วย', zh: '{{#def.n}}应当拥有属性{{=e.params.property}}的依赖属性{{=e.params.deps}}' >>>>>>> th: '{{#def.n}}เมื่อมี property {{=e.params.property}} แล้วก็ควรมี property {{=e.params.deps}} ด้วย', zh: '{{#def.n}}应当拥有属性{{=e.params.property}}的依赖属性{{=e.params.deps}}', 'zh-TW': '{{#def.n}}應該要有屬性{{=e.params.property}}的依賴屬性{{=e.params.deps}}' <<<<<<< zh: '应当是预设定的枚举值之一', 'zh-TW': '應該要在預設的值之中' ======= th: 'ควรตรงกับค่าที่กำหนดไว้', zh: '应当是预设定的枚举值之一' >>>>>>> th: 'ควรตรงกับค่าที่กำหนดไว้', zh: '应当是预设定的枚举值之一', 'zh-TW': '應該要在預設的值之中' <<<<<<< zh: '应当匹配格式 "{{=e.params.format}}"', 'zh-TW': '應該要符合{{=e.params.format}}格式' ======= th: 'ควรมีรูปแบบเป็น "{{=e.params.format}}"', zh: '应当匹配格式 "{{=e.params.format}}"' >>>>>>> th: 'ควรมีรูปแบบเป็น "{{=e.params.format}}"', zh: '应当匹配格式 "{{=e.params.format}}"', 'zh-TW': '應該要符合{{=e.params.format}}格式' <<<<<<< zh: '{{#def.c}}应当为 {{=cond}}', 'zh-TW': '{{#def.c}}應該要 {{=cond}}' ======= th: '{{#def.c}}ควร {{=cond}}', zh: '{{#def.c}}应当为 {{=cond}}' >>>>>>> th: '{{#def.c}}ควร {{=cond}}', zh: '{{#def.c}}应当为 {{=cond}}', 'zh-TW': '{{#def.c}}應該要 {{=cond}}' <<<<<<< zh: '{{#def.c}}应当为 {{=cond}}', 'zh-TW': '{{#def.c}}應該要 {{=cond}}' ======= th: '{{#def.c}}ควร {{=cond}}', zh: '{{#def.c}}应当为 {{=cond}}' >>>>>>> th: '{{#def.c}}ควร {{=cond}}', zh: '{{#def.c}}应当为 {{=cond}}', 'zh-TW': '{{#def.c}}應該要 {{=cond}}' <<<<<<< zh: '{{#def.n}}不应多于 {{=n}} 个项', 'zh-TW': '{{#def.n}}不應該多於 {{=n}} 個' ======= th: '{{#def.n}}ควรมีสมาชิกไม่เกิน {{=n}}', zh: '{{#def.n}}不应多于 {{=n}} 个项' >>>>>>> th: '{{#def.n}}ควรมีสมาชิกไม่เกิน {{=n}}', zh: '{{#def.n}}不应多于 {{=n}} 个项', 'zh-TW': '{{#def.n}}不應該多於 {{=n}} 個' <<<<<<< zh: '{{#def.n}}不应少于 {{=n}} 个项', 'zh-TW': '{{#def.n}}不應該少於 {{=n}} 個' ======= th: '{{#def.n}}ควรมีสมาชิกไม่น้อยกว่า {{=n}}', zh: '{{#def.n}}不应少于 {{=n}} 个项' >>>>>>> th: '{{#def.n}}ควรมีสมาชิกไม่น้อยกว่า {{=n}}', zh: '{{#def.n}}不应少于 {{=n}} 个项', 'zh-TW': '{{#def.n}}不應該少於 {{=n}} 個' <<<<<<< zh: '{{#def.n}}不应多于 {{=n}} 个字符', 'zh-TW': '{{#def.n}}不應該多於 {{=n}} 個字元' ======= th: '{{#def.n}}ไม่ควรมากกว่า {{=n}} ตัวอักษร', zh: '{{#def.n}}不应多于 {{=n}} 个字符' >>>>>>> th: '{{#def.n}}ไม่ควรมากกว่า {{=n}} ตัวอักษร', zh: '{{#def.n}}不应多于 {{=n}} 个字符', 'zh-TW': '{{#def.n}}不應該多於 {{=n}} 個字元' <<<<<<< zh: '{{#def.n}}不应少于 {{=n}} 个字符', 'zh-TW': '{{#def.n}}不應該少於 {{=n}} 個字元' ======= th: '{{#def.n}}ไม่ควรน้อยกว่า {{=n}} ตัวอักษร', zh: '{{#def.n}}不应少于 {{=n}} 个字符' >>>>>>> th: '{{#def.n}}ไม่ควรน้อยกว่า {{=n}} ตัวอักษร', zh: '{{#def.n}}不应少于 {{=n}} 个字符', 'zh-TW': '{{#def.n}}不應該少於 {{=n}} 個字元' <<<<<<< zh: '{{#def.n}}不应有多于 {{=n}} 个属性', 'zh-TW': '{{#def.n}}不應該多於 {{=n}} 個屬性' ======= th: '{{#def.n}}ไม่ควรมี property เกิน {{=n}}', zh: '{{#def.n}}不应有多于 {{=n}} 个属性' >>>>>>> th: '{{#def.n}}ไม่ควรมี property เกิน {{=n}}', zh: '{{#def.n}}不应有多于 {{=n}} 个属性', 'zh-TW': '{{#def.n}}不應該多於 {{=n}} 個屬性' <<<<<<< zh: '{{#def.n}}不应有少于 {{=n}} 个属性', 'zh-TW': '{{#def.n}}不應該少於 {{=n}} 個屬性' ======= th: '{{#def.n}}ไม่ควรมี property น้อยกว่า {{=n}}', zh: '{{#def.n}}不应有少于 {{=n}} 个属性' >>>>>>> th: '{{#def.n}}ไม่ควรมี property น้อยกว่า {{=n}}', zh: '{{#def.n}}不应有少于 {{=n}} 个属性', 'zh-TW': '{{#def.n}}不應該少於 {{=n}} 個屬性' <<<<<<< zh: '应当是 {{=e.params.multipleOf}} 的整数倍', 'zh-TW': '應該是 {{=e.params.multipleOf}} 的整數倍' ======= th: 'ควรเป็นเลขที่หาร {{=e.params.multipleOf}} ลงตัว', zh: '应当是 {{=e.params.multipleOf}} 的整数倍' >>>>>>> th: 'ควรเป็นเลขที่หาร {{=e.params.multipleOf}} ลงตัว', zh: '应当是 {{=e.params.multipleOf}} 的整数倍', 'zh-TW': '應該是 {{=e.params.multipleOf}} 的整數倍' <<<<<<< zh: '不应当匹配 "not" schema', 'zh-TW': '不應該符合 "not" schema' ======= th: 'ไม่ควรถูกต้องตาม schema ที่กำหนดไว้ใน "not"', zh: '不应当匹配 "not" schema' >>>>>>> th: 'ไม่ควรถูกต้องตาม schema ที่กำหนดไว้ใน "not"', zh: '不应当匹配 "not" schema', 'zh-TW': '不應該符合 "not" schema' <<<<<<< zh: '只能匹配一个 "oneOf" 中的 schema', 'zh-TW': '只能符合一個 "oneOf" 中的 schema' ======= th: 'ควรตรงกับเพียง schema เดียวใน "oneOf" เท่านั้น', zh: '只能匹配一个 "oneOf" 中的 schema' >>>>>>> th: 'ควรตรงกับเพียง schema เดียวใน "oneOf" เท่านั้น', zh: '只能匹配一个 "oneOf" 中的 schema', 'zh-TW': '只能符合一個 "oneOf" 中的 schema' <<<<<<< zh: '应当匹配模式 "{{=e.params.pattern}}"', 'zh-TW': '應該符合模式 "{{=e.params.pattern}}"' ======= th: 'ควรตรงกับแพทเทิร์น "{{=e.params.pattern}}"', zh: '应当匹配模式 "{{=e.params.pattern}}"' >>>>>>> th: 'ควรตรงกับแพทเทิร์น "{{=e.params.pattern}}"', zh: '应当匹配模式 "{{=e.params.pattern}}"', 'zh-TW': '應該符合模式 "{{=e.params.pattern}}"' <<<<<<< zh: '应当有必需属性 {{=e.params.missingProperty}}', 'zh-TW': '應該有必須屬性 {{=e.params.missingProperty}}' ======= th: 'ควรมี property {{=e.params.missingProperty}} ที่บังคับไว้', zh: '应当有必需属性 {{=e.params.missingProperty}}' >>>>>>> th: 'ควรมี property {{=e.params.missingProperty}} ที่บังคับไว้', zh: '应当有必需属性 {{=e.params.missingProperty}}', 'zh-TW': '應該有必須屬性 {{=e.params.missingProperty}}' <<<<<<< zh: '应当是 {{=e.params.type}} 类型', 'zh-TW': '應該是 {{=e.params.type}} 類型' ======= th: 'ควรเป็น {{=e.params.type}}', zh: '应当是 {{=e.params.type}} 类型' >>>>>>> th: 'ควรเป็น {{=e.params.type}}', zh: '应当是 {{=e.params.type}} 类型', 'zh-TW': '應該是 {{=e.params.type}} 類型' <<<<<<< zh: '不应当含有重复项 (第 {{=e.params.j}} 项与第 {{=e.params.i}} 项是重复的)', 'zh-TW': '不應該有重複項目 (第 {{=e.params.j}} 項和第 {{=e.params.i}} 項是重複的)' ======= th: 'ไม่ควรมีสมาชิกซ้ำักัน (ลำดับที่ {{=e.params.j}} และ {{=e.params.i}} ซ้ำ)', zh: '不应当含有重复项 (第 {{=e.params.j}} 项与第 {{=e.params.i}} 项是重复的)' >>>>>>> th: 'ไม่ควรมีสมาชิกซ้ำักัน (ลำดับที่ {{=e.params.j}} และ {{=e.params.i}} ซ้ำ)', zh: '不应当含有重复项 (第 {{=e.params.j}} 项与第 {{=e.params.i}} 项是重复的)', 'zh-TW': '不應該有重複項目 (第 {{=e.params.j}} 項和第 {{=e.params.i}} 項是重複的)' <<<<<<< zh: '应当通过 "{{=e.keyword}} 关键词校验"', 'zh-TW': '應該通過 "{{=e.keyword}} 關鍵詞檢驗"' ======= th: 'ควรผ่านคีย์เวิร์ด "{{=e.keyword}}"', zh: '应当通过 "{{=e.keyword}} 关键词校验"' >>>>>>> th: 'ควรผ่านคีย์เวิร์ด "{{=e.keyword}}"', zh: '应当通过 "{{=e.keyword}} 关键词校验"', 'zh-TW': '應該通過 "{{=e.keyword}} 關鍵詞檢驗"' <<<<<<< zh: '应当有属性匹配模式 {{=e.params.missingPattern}}', 'zh-TW': '應該有屬性對應模式 {{=e.params.missingPattern}}' ======= th: 'ควรมี property ที่มีชื่อตรงกับ pattern "{{=e.params.missingPattern}}"', zh: '应当有属性匹配模式 {{=e.params.missingPattern}}' >>>>>>> th: 'ควรมี property ที่มีชื่อตรงกับ pattern "{{=e.params.missingPattern}}"', zh: '应当有属性匹配模式 {{=e.params.missingPattern}}', 'zh-TW': '應該有屬性對應模式 {{=e.params.missingPattern}}' <<<<<<< zh: '由于 {{=e.params.caseIndex}} 失败,未通过 "switch" 校验, ', 'zh-TW': '因為 {{=e.params.caseIndex}} 失败,沒有通過 "switch" 檢驗, ' ======= th: 'ควรผ่านคีย์เวิร์ด "switch", ผิดเคสที่ {{=e.params.caseIndex}}', zh: '由于 {{=e.params.caseIndex}} 失败,未通过 "switch" 校验, ' >>>>>>> th: 'ควรผ่านคีย์เวิร์ด "switch", ผิดเคสที่ {{=e.params.caseIndex}}', zh: '由于 {{=e.params.caseIndex}} 失败,未通过 "switch" 校验, ', 'zh-TW': '因為 {{=e.params.caseIndex}} 失败,沒有通過 "switch" 檢驗, ' <<<<<<< zh: '应当等于常量', 'zh-TW': '應該等於常數' ======= th: 'ควรมีค่าเหมือนกับค่าคงที่', zh: '应当等于常量' >>>>>>> th: 'ควรมีค่าเหมือนกับค่าคงที่', zh: '应当等于常量', 'zh-TW': '應該等於常數' <<<<<<< zh: '应当包含一个有效项', 'zh-TW': '應該包含一個有效元素' ======= th: 'ควรมีสมาชิกที่ถูกต้องอยู่', zh: '应当包含一个有效项' >>>>>>> th: 'ควรมีสมาชิกที่ถูกต้องอยู่', zh: '应当包含一个有效项', 'zh-TW': '應該包含一個有效元素' <<<<<<< zh: '{{#def.c}}应当是 {{=cond}}', 'zh-TW': '{{#def.c}}應該是 {{=cond}}' ======= th: '{{#def.c}}ควร {{=cond}}', zh: '{{#def.c}}应当是 {{=cond}}' >>>>>>> th: '{{#def.c}}ควร {{=cond}}', zh: '{{#def.c}}应当是 {{=cond}}', 'zh-TW': '{{#def.c}}應該是 {{=cond}}' <<<<<<< zh: '{{#def.c}}应当是 {{=cond}}', 'zh-TW': '{{#def.c}}應該是 {{=cond}}' ======= th: '{{#def.c}}ควร {{=cond}}', zh: '{{#def.c}}应当是 {{=cond}}' >>>>>>> th: '{{#def.c}}ควร {{=cond}}', zh: '{{#def.c}}应当是 {{=cond}}', 'zh-TW': '{{#def.c}}應該是 {{=cond}}' <<<<<<< zh: 'formatExclusiveMaximum 应当是布尔值', 'zh-TW': 'formatExclusiveMaximum 應該是布林值' ======= th: 'formatExclusiveMaximum ควรเป็น boolean', zh: 'formatExclusiveMaximum 应当是布尔值' >>>>>>> th: 'formatExclusiveMaximum ควรเป็น boolean', zh: 'formatExclusiveMaximum 应当是布尔值', 'zh-TW': 'formatExclusiveMaximum 應該是布林值' <<<<<<< sv: 'formatExclusiveMaximum bör vara en boolean', zh: 'formatExclusiveMinimum 应当是布尔值', 'zh-TW': 'formatExclusiveMinimum 應該是布林值' ======= sv: 'formatExclusiveMinimum bör vara en boolean', th: 'formatExclusiveMinimum ควรเป็น boolean', zh: 'formatExclusiveMinimum 应当是布尔值' >>>>>>> sv: 'formatExclusiveMaximum bör vara en boolean', th: 'formatExclusiveMinimum ควรเป็น boolean', zh: 'formatExclusiveMinimum 应当是布尔值', 'zh-TW': 'formatExclusiveMinimum 應該是布林值' <<<<<<< zh: '应当匹配模式 "{{=e.params.failingKeyword}}" ', 'zh-TW': '應該符合 "{{=e.params.failingKeyword}}" schema' ======= th: 'ควรตรงกับ schema "{{=e.params.failingKeyword}}"', zh: '应当匹配模式 "{{=e.params.failingKeyword}}" ' >>>>>>> th: 'ควรตรงกับ schema "{{=e.params.failingKeyword}}"', zh: '应当匹配模式 "{{=e.params.failingKeyword}}" ', 'zh-TW': '應該符合 "{{=e.params.failingKeyword}}" schema'
<<<<<<< _locales: ['de', 'en', 'hu', 'it', 'ja', 'pl', 'ru', 'es', 'zh-CN'], ======= _locales: ['de', 'en', 'hu', 'it', 'ja', 'pl', 'ru', 'es', 'sv'], >>>>>>> _locales: ['de', 'en', 'hu', 'it', 'ja', 'pl', 'ru', 'es', 'sv', 'zh-CN'], <<<<<<< es: 'no se puede resolver la referencia {{=e.params.ref}}', 'zh-CN': '无法找到引用{{=e.params.ref}}' ======= es: 'no se puede resolver la referencia {{=e.params.ref}}', sv: 'kan inte lösa referens {{=e.params.ref}}' >>>>>>> es: 'no se puede resolver la referencia {{=e.params.ref}}', sv: 'kan inte lösa referens {{=e.params.ref}}', 'zh-CN': '无法找到引用{{=e.params.ref}}' <<<<<<< es: '{{#def.n}}no debe tener más de {{=n}} elemento{{#def.mPlural}}', 'zh-CN': '{{#def.n}}不允许超过{{=n}}个元素' ======= es: '{{#def.n}}no debe tener más de {{=n}} elemento{{#def.mPlural}}', sv: '{{#def.n}}borde ha fler än {{=n}} sak{{#def.mPlural}}' >>>>>>> es: '{{#def.n}}no debe tener más de {{=n}} elemento{{#def.mPlural}}', sv: '{{#def.n}}borde ha fler än {{=n}} sak{{#def.mPlural}}', 'zh-CN': '{{#def.n}}不允许超过{{=n}}个元素' <<<<<<< es: 'no debe tener propiedades adicionales', 'zh-CN': '不允许有额外的属性' ======= es: 'no debe tener propiedades adicionales', sv: 'borde inte ha fler egenskaper' >>>>>>> es: 'no debe tener propiedades adicionales', sv: 'borde inte ha fler egenskaper', 'zh-CN': '不允许有额外的属性' <<<<<<< es: 'debe coincidir con algún esquema en "anyOf"', 'zh-CN': '数据应为 anyOf 所指定的其中一个' ======= es: 'debe coincidir con algún esquema en "anyOf"', sv: 'borde matcha något schema i "anyOf"' >>>>>>> es: 'debe coincidir con algún esquema en "anyOf"', sv: 'borde matcha något schema i "anyOf"', 'zh-CN': '数据应为 anyOf 所指定的其中一个' <<<<<<< es: '{{#def.n}}debe contener la{{#def.mPlural}} propiedad{{#def.propPlural}} {{=e.params.deps}} cuando la propiedad {{=e.params.property}} se encuentra presente', 'zh-CN': '{{#def.n}}应当拥有属性{{=e.params.property}}的依赖属性{{=e.params.deps}}' ======= es: '{{#def.n}}debe contener la{{#def.mPlural}} propiedad{{#def.propPlural}} {{=e.params.deps}} cuando la propiedad {{=e.params.property}} se encuentra presente', sv: '{{#def.n}}borde ha egenskap{{#def.propPlural}} {{=e.params.deps}} när egenskap {{=e.params.property}} finns tillgängligt' >>>>>>> es: '{{#def.n}}debe contener la{{#def.mPlural}} propiedad{{#def.propPlural}} {{=e.params.deps}} cuando la propiedad {{=e.params.property}} se encuentra presente', sv: '{{#def.n}}borde ha egenskap{{#def.propPlural}} {{=e.params.deps}} när egenskap {{=e.params.property}} finns tillgängligt', 'zh-CN': '{{#def.n}}应当拥有属性{{=e.params.property}}的依赖属性{{=e.params.deps}}' <<<<<<< es: 'deber ser igual a uno de los valores predefinidos', 'zh-CN': '应当是预设定的枚举值之一' ======= es: 'deber ser igual a uno de los valores predefinidos', sv: 'borde vara ekvivalent med en av dess fördefinierade värden' >>>>>>> es: 'deber ser igual a uno de los valores predefinidos', sv: 'borde vara ekvivalent med en av dess fördefinierade värden', 'zh-CN': '应当是预设定的枚举值之一' <<<<<<< es: 'debe coincidir con el formato "{{=e.params.format}}"', 'zh-CN': '应当匹配格式 "{{=e.params.format}}"' ======= es: 'debe coincidir con el formato "{{=e.params.format}}"', sv: 'borde matcha formatet "{{=e.params.format}}"' >>>>>>> es: 'debe coincidir con el formato "{{=e.params.format}}"', sv: 'borde matcha formatet "{{=e.params.format}}"', 'zh-CN': '应当匹配格式 "{{=e.params.format}}"' <<<<<<< es: '{{#def.c}}debe ser {{=cond}}', 'zh-CN': '{{#def.c}}应当为 {{=cond}}' ======= es: '{{#def.c}}debe ser {{=cond}}', sv: '{{#def.c}}borde vara {{=cond}}' >>>>>>> es: '{{#def.c}}debe ser {{=cond}}', sv: '{{#def.c}}borde vara {{=cond}}', 'zh-CN': '{{#def.c}}应当为 {{=cond}}' <<<<<<< es: '{{#def.c}}debe ser {{=cond}}', 'zh-CN': '{{#def.c}}应当为 {{=cond}}' ======= es: '{{#def.c}}debe ser {{=cond}}', sv: '{{#def.c}}borde vara {{=cond}}' >>>>>>> es: '{{#def.c}}debe ser {{=cond}}', sv: '{{#def.c}}borde vara {{=cond}}', 'zh-CN': '{{#def.c}}应当为 {{=cond}}' <<<<<<< es: '{{#def.n}}no debe contener más de {{=n}} elemento{{#def.mPlural}}', 'zh-CN': '{{#def.n}}不应多于 {{=n}} 个项' ======= es: '{{#def.n}}no debe contener más de {{=n}} elemento{{#def.mPlural}}', sv: '{{#def.n}}borde inte ha fler än {{=n}} sak{{#def.mPlural}}' >>>>>>> es: '{{#def.n}}no debe contener más de {{=n}} elemento{{#def.mPlural}}', sv: '{{#def.n}}borde inte ha fler än {{=n}} sak{{#def.mPlural}}', 'zh-CN': '{{#def.n}}不应多于 {{=n}} 个项' <<<<<<< es: '{{#def.n}}no debe contener menos de {{=n}} elemento{{#def.mPlural}}', 'zh-CN': '{{#def.n}}不应少于 {{=n}} 个项' ======= es: '{{#def.n}}no debe contener menos de {{=n}} elemento{{#def.mPlural}}', sv: '{{#def.n}}borde inte ha färre än {{=n}} sak{{#def.mPlural}}' >>>>>>> es: '{{#def.n}}no debe contener menos de {{=n}} elemento{{#def.mPlural}}', sv: '{{#def.n}}borde inte ha färre än {{=n}} sak{{#def.mPlural}}', 'zh-CN': '{{#def.n}}不应少于 {{=n}} 个项' <<<<<<< es: '{{#def.n}}no debe contener más de {{=n}} caracter{{? n!=1 }}es{{?}}', 'zh-CN': '{{#def.n}}不应多于 {{=n}} 个字符' ======= es: '{{#def.n}}no debe contener más de {{=n}} caracter{{? n!=1 }}es{{?}}', sv: '{{#def.n}}borde inte vara längre än {{=n}} tecken' >>>>>>> es: '{{#def.n}}no debe contener más de {{=n}} caracter{{? n!=1 }}es{{?}}', sv: '{{#def.n}}borde inte vara längre än {{=n}} tecken', 'zh-CN': '{{#def.n}}不应多于 {{=n}} 个字符' <<<<<<< es: '{{#def.n}}no debe contener menos de {{=n}} caracter{{? n!=1 }}es{{?}}', 'zh-CN': '{{#def.n}}不应少于 {{=n}} 个字符' ======= es: '{{#def.n}}no debe contener menos de {{=n}} caracter{{? n!=1 }}es{{?}}', sv: '{{#def.n}}borde inte vara kortare än {{=n}} tecken' >>>>>>> es: '{{#def.n}}no debe contener menos de {{=n}} caracter{{? n!=1 }}es{{?}}', sv: '{{#def.n}}borde inte vara kortare än {{=n}} tecken', 'zh-CN': '{{#def.n}}不应少于 {{=n}} 个字符' <<<<<<< es: '{{#def.n}}no debe contener más de {{=n}} propiedad{{#def.propPlural}}', 'zh-CN': '{{#def.n}}不应有多于 {{=n}} 个属性' ======= es: '{{#def.n}}no debe contener más de {{=n}} propiedad{{#def.propPlural}}', sv: '{{#def.n}}borde inte ha fler än {{=n}} egenskap{{#def.propPlural}}' >>>>>>> es: '{{#def.n}}no debe contener más de {{=n}} propiedad{{#def.propPlural}}', sv: '{{#def.n}}borde inte ha fler än {{=n}} egenskap{{#def.propPlural}}', 'zh-CN': '{{#def.n}}不应有多于 {{=n}} 个属性' <<<<<<< es: '{{#def.n}}no debe contener menos de {{=n}} propiedad{{#def.propPlural}}', 'zh-CN': '{{#def.n}}不应有少于 {{=n}} 个属性' ======= es: '{{#def.n}}no debe contener menos de {{=n}} propiedad{{#def.propPlural}}', sv: '{{#def.n}}borde inte ha färre än {{=n}} egenskap{{#def.propPlural}}' >>>>>>> es: '{{#def.n}}no debe contener menos de {{=n}} propiedad{{#def.propPlural}}', sv: '{{#def.n}}borde inte ha färre än {{=n}} egenskap{{#def.propPlural}}', 'zh-CN': '{{#def.n}}不应有少于 {{=n}} 个属性' <<<<<<< es: 'debe ser múltiplo de {{=e.params.multipleOf}}', 'zh-CN': '应当是 {{=e.params.multipleOf}} 的整数倍' ======= es: 'debe ser múltiplo de {{=e.params.multipleOf}}', sv: 'borde vara en multipel av {{=e.params.multipleOf}}' >>>>>>> es: 'debe ser múltiplo de {{=e.params.multipleOf}}', sv: 'borde vara en multipel av {{=e.params.multipleOf}}', 'zh-CN': '应当是 {{=e.params.multipleOf}} 的整数倍' <<<<<<< es: 'no debe ser válido según el esquema en "not"', 'zh-CN': '不应当匹配 "not" schema' ======= es: 'no debe ser válido según el esquema en "not"', sv: 'borde inte vara giltigt enligt schema i "not"' >>>>>>> es: 'no debe ser válido según el esquema en "not"', sv: 'borde inte vara giltigt enligt schema i "not"', 'zh-CN': '不应当匹配 "not" schema' <<<<<<< es: 'debe coincidir con un solo esquema en "oneOf"', 'zh-CN': '只能匹配一个 "oneOf" 中的 schema' ======= es: 'debe coincidir con un solo esquema en "oneOf"', sv: 'borde matcha exakt ett schema i "oneOf"' >>>>>>> es: 'debe coincidir con un solo esquema en "oneOf"', sv: 'borde matcha exakt ett schema i "oneOf"', 'zh-CN': '只能匹配一个 "oneOf" 中的 schema' <<<<<<< es: 'debe coincidir con el patron "{{=e.params.pattern}}"', 'zh-CN': '应当匹配模式 "{{=e.params.pattern}}"' ======= es: 'debe coincidir con el patron "{{=e.params.pattern}}"', sv: 'borde matcha mönstret "{{=e.params.pattern}}"' >>>>>>> es: 'debe coincidir con el patron "{{=e.params.pattern}}"', sv: 'borde matcha mönstret "{{=e.params.pattern}}"', 'zh-CN': '应当匹配模式 "{{=e.params.pattern}}"' <<<<<<< es: 'debe tener la propiedad requerida {{=e.params.missingProperty}}', 'zh-CN': '应当有必需属性 {{=e.params.missingProperty}}' ======= es: 'debe tener la propiedad requerida {{=e.params.missingProperty}}', sv: 'borde ha den nödvändiga egenskapen {{=e.params.missingProperty}}' >>>>>>> es: 'debe tener la propiedad requerida {{=e.params.missingProperty}}', sv: 'borde ha den nödvändiga egenskapen {{=e.params.missingProperty}}', 'zh-CN': '应当有必需属性 {{=e.params.missingProperty}}' <<<<<<< es: 'debe ser {{=e.params.type}}', 'zh-CN': '应当是 {{=e.params.type}} 类型' ======= es: 'debe ser {{=e.params.type}}', sv: 'borde vara {{=e.params.type}}' >>>>>>> es: 'debe ser {{=e.params.type}}', sv: 'borde vara {{=e.params.type}}', 'zh-CN': '应当是 {{=e.params.type}} 类型' <<<<<<< es: 'no debe contener elementos duplicados, (los elementos ## {{=e.params.j}} y {{=e.params.i}} son idénticos)', 'zh-CN': '不应当含有重复项 (第 {{=e.params.j}} 项与第 {{=e.params.i}} 项是重复的)' ======= es: 'no debe contener elementos duplicados, (los elementos ## {{=e.params.j}} y {{=e.params.i}} son idénticos)', sv: 'borde inte ha duplicerade saker (sakerna ## {{=e.params.j}} och {{=e.params.i}} är identiska)' >>>>>>> es: 'no debe contener elementos duplicados, (los elementos ## {{=e.params.j}} y {{=e.params.i}} son idénticos)', sv: 'borde inte ha duplicerade saker (sakerna ## {{=e.params.j}} och {{=e.params.i}} är identiska)', 'zh-CN': '不应当含有重复项 (第 {{=e.params.j}} 项与第 {{=e.params.i}} 项是重复的)' <<<<<<< es: 'debe pasar la validación de palabra clave "{{=e.keyword}}"', 'zh-CN': '应当通过 "{{=e.keyword}} 关键词校验"' ======= es: 'debe pasar la validación de palabra clave "{{=e.keyword}}"', sv: 'bör passera "{{=e.keyword}}" nyckelord validering' >>>>>>> es: 'debe pasar la validación de palabra clave "{{=e.keyword}}"', sv: 'bör passera "{{=e.keyword}}" nyckelord validering', 'zh-CN': '应当通过 "{{=e.keyword}} 关键词校验"' <<<<<<< es: '{{#def.n}}debe tener {{=e.params.reason}} {{=n}} propiedad{{#def.propPlural}} coincidente{{#def.mPlural}} con el patrón "{{=e.params.pattern}}"', 'zh-CN': '{{#def.n}}应当有 {{=n}} 个 {{=e.params.reason}} 属性满足模式 {{=e.params.pattern}}' ======= es: '{{#def.n}}debe tener {{=e.params.reason}} {{=n}} propiedad{{#def.propPlural}} coincidente{{#def.mPlural}} con el patrón "{{=e.params.pattern}}"', sv: '{{#def.n}}bör ha {{=e.params.reason}} {{=n}} egenskap{{#def.propPlural}} som matchar mönstret "{{=e.params.pattern}}"' >>>>>>> es: '{{#def.n}}debe tener {{=e.params.reason}} {{=n}} propiedad{{#def.propPlural}} coincidente{{#def.mPlural}} con el patrón "{{=e.params.pattern}}"', sv: '{{#def.n}}bör ha {{=e.params.reason}} {{=n}} egenskap{{#def.propPlural}} som matchar mönstret "{{=e.params.pattern}}"', 'zh-CN': '{{#def.n}}应当有 {{=n}} 个 {{=e.params.reason}} 属性满足模式 {{=e.params.pattern}}' <<<<<<< es: 'la propiedad debe coincidir con el patrón "{{=e.params.missingPattern}}"', 'zh-CN': '应当有属性匹配模式 {{=e.params.missingPattern}}' ======= es: 'la propiedad debe coincidir con el patrón "{{=e.params.missingPattern}}"', sv: 'bör ha en egenskap som matchar mönstret "{{=e.params.missingPattern}}"' >>>>>>> es: 'la propiedad debe coincidir con el patrón "{{=e.params.missingPattern}}"', sv: 'bör ha en egenskap som matchar mönstret "{{=e.params.missingPattern}}"', 'zh-CN': '应当有属性匹配模式 {{=e.params.missingPattern}}' <<<<<<< es: 'debe pasar la validación \"switch\" de palabra clave, el caso {{=e.params.caseIndex}} falló', 'zh-CN': '由于 {{=e.params.caseIndex}} 失败,未通过 "switch" 校验, ' ======= es: 'debe pasar la validación \"switch\" de palabra clave, el caso {{=e.params.caseIndex}} falló', sv: 'bör passera \"switch\" nyckelord validering, fallet {{=e.params.caseIndex}} misslyckas', >>>>>>> es: 'debe pasar la validación \"switch\" de palabra clave, el caso {{=e.params.caseIndex}} falló', sv: 'bör passera \"switch\" nyckelord validering, fallet {{=e.params.caseIndex}} misslyckas', 'zh-CN': '由于 {{=e.params.caseIndex}} 失败,未通过 "switch" 校验, ' <<<<<<< es: 'debe ser igual a la constante', 'zh-CN': '应当等于常量' ======= es: 'debe ser igual a la constante', sv: 'bör vara en konstant' >>>>>>> es: 'debe ser igual a la constante', sv: 'bör vara en konstant', 'zh-CN': '应当等于常量' <<<<<<< es: '{{#def.c}}debe ser {{=cond}}', 'zh-CN': '{{#def.c}}应当是 {{=cond}}' ======= es: '{{#def.c}}debe ser {{=cond}}', sv: '{{#def.c}}bör vara {{=cond}}' >>>>>>> es: '{{#def.c}}debe ser {{=cond}}', sv: '{{#def.c}}bör vara {{=cond}}', 'zh-CN': '{{#def.c}}应当是 {{=cond}}' <<<<<<< es: '{{#def.c}}debe ser {{=cond}}', 'zh-CN': '{{#def.c}}应当是 {{=cond}}' ======= es: '{{#def.c}}debe ser {{=cond}}', sv: '{{#def.c}}bör vara {{=cond}}' >>>>>>> es: '{{#def.c}}debe ser {{=cond}}', sv: '{{#def.c}}bör vara {{=cond}}', 'zh-CN': '{{#def.c}}应当是 {{=cond}}' <<<<<<< es: 'formatExclusiveMaximum debe ser booleano', 'zh-CN': 'formatExclusiveMaximum 应当是布尔值' ======= es: 'formatExclusiveMaximum debe ser booleano', sv: 'formatExclusiveMaximum bör vara en boolean' >>>>>>> es: 'formatExclusiveMaximum debe ser booleano', sv: 'formatExclusiveMaximum bör vara en boolean', 'zh-CN': 'formatExclusiveMaximum 应当是布尔值' <<<<<<< es: 'formatExclusiveMinimum debe ser booleano', 'zh-CN': 'formatExclusiveMinimum 应当是布尔值' ======= es: 'formatExclusiveMinimum debe ser booleano', sv: 'formatExclusiveMaximum bör vara en boolean' >>>>>>> es: 'formatExclusiveMinimum debe ser booleano', sv: 'formatExclusiveMaximum bör vara en boolean', 'zh-CN': 'formatExclusiveMinimum 应当是布尔值'
<<<<<<< assert.isTrue(wrapper.containsMatchingElement(<option value="luna">Moon</option>)); assert.isFalse(wrapper.containsMatchingElement(<option value="phobos">Phobos</option>)); ======= assert.isTrue(wrapper.contains(<option id={getExpectedId('option-luna')} value="luna">Moon</option>)); assert.isFalse(wrapper.contains(<option id={getExpectedId('option-phobos')} value="phobos">Phobos</option>)); >>>>>>> assert.isTrue(wrapper.containsMatchingElement(<option value="luna">Moon</option>)); assert.isFalse(wrapper.containsMatchingElement(<option value="phobos">Phobos</option>)); <<<<<<< assert.isFalse(wrapper.containsMatchingElement(<option value="luna">Moon</option>)); assert.isTrue(wrapper.containsMatchingElement(<option value="phobos">Phobos (Mars)</option>)); ======= assert.isFalse(wrapper.contains(<option id={getExpectedId('option-luna')} value="luna">Moon</option>)); assert.isTrue(wrapper.contains(<option id={getExpectedId('option-phobos')} value="phobos">Phobos (Mars)</option>)); >>>>>>> assert.isFalse(wrapper.containsMatchingElement(<option value="luna">Moon</option>)); assert.isTrue(wrapper.containsMatchingElement(<option value="phobos">Phobos (Mars)</option>)); <<<<<<< <optgroup label="Mars"> <option data-real-value="phobos" value="phobos">Phobos</option> <option data-real-value="deimos" value="deimos">Deimos</option> ======= <optgroup id={getExpectedId('optgroup-Mars')} label="Mars"> <option id={getExpectedId('option-phobos')} value="phobos">Phobos</option> <option id={getExpectedId('option-deimos')} value="deimos">Deimos</option> >>>>>>> <optgroup id={getExpectedId('optgroup-Mars')} label="Mars"> <option data-real-value="phobos" id={getExpectedId('option-phobos')} value="phobos">Phobos</option> <option data-real-value="deimos" id={getExpectedId('option-deimos')} value="deimos">Deimos</option>
<<<<<<< constructor(publicPath) { this.publicPath = publicPath; this.path = path.join(publicPath, 'mix-manifest.json'); ======= constructor() { this.manifest = {}; >>>>>>> constructor() { <<<<<<< this.manifest = this.cache; ======= this.registerEvents(); } /** * Register any applicable event listeners. */ registerEvents() { global.events.listen('combined', this.appendCombinedFiles.bind(this)) .listen('standalone-sass-compiled', compiledFile => { this.add(compiledFile); this.refresh(); }); return this; >>>>>>> this.manifest = this.cache; this.registerEvents(); } /** * Register any applicable event listeners. */ registerEvents() { global.events.listen('combined', this.appendCombinedFiles.bind(this)) .listen('standalone-sass-compiled', compiledFile => { this.add(compiledFile); this.refresh(); }); return this; <<<<<<< manifest = object.merge(manifest, this.cache); File.find(this.path).write(manifest); ======= File.find(this.path()).write(manifest); } /** * Get the path to the manifest file. */ path() { return path.join(global.options.publicPath, 'mix-manifest.json'); >>>>>>> manifest = object.merge(manifest, this.cache); File.find(this.path()).write(manifest); } /** * Get the path to the manifest file. */ path() { return path.join(global.options.publicPath, 'mix-manifest.json');
<<<<<<< import TransactionDetailScreen from './modules/TransactionDetail/screen/TransactionDetailScreen' ======= import DAppBrowserScreen from './modules/DAppBrowser/DAppBrowserScreen' import DAppListScreen from './modules/DAppBrowser/screen/DAppListScreen' >>>>>>> import TransactionDetailScreen from './modules/TransactionDetail/screen/TransactionDetailScreen' import DAppBrowserScreen from './modules/DAppBrowser/DAppBrowserScreen' import DAppListScreen from './modules/DAppBrowser/screen/DAppListScreen' <<<<<<< }, TransactionDetailScreen: { screen: TransactionDetailScreen, navigationOptions: { header: null } ======= }, DAppWebScreen: { screen: DAppBrowserScreen, navigationOptions: { header: null } >>>>>>> }, TransactionDetailScreen: { screen: TransactionDetailScreen, navigationOptions: { header: null } }, DAppWebScreen: { screen: DAppBrowserScreen, navigationOptions: { header: null }
<<<<<<< AppVersion.getChangelogsLatest() AppVersion.getChangelogsList() TickerStore.callApi() ======= >>>>>>> AppVersion.getChangelogsLatest() AppVersion.getChangelogsList() <<<<<<< const version = DeviceInfo.getVersion() if (version !== AppVersion.latestVersion.version_number) { this._gotoNewUpdatedAvailableScreen() } ======= TickerStore.callApi() MainStore.appState.startAllBgJobs() >>>>>>> const version = DeviceInfo.getVersion() if (version !== AppVersion.latestVersion.version_number) { this._gotoNewUpdatedAvailableScreen() } TickerStore.callApi() MainStore.appState.startAllBgJobs()
<<<<<<< ApiREST.prototype.createOrReplace = function (body, index) { ======= ApiREST.prototype.createOrUpdate = function (body, index, collection) { >>>>>>> ApiREST.prototype.createOrReplace = function (body, index, collection) { <<<<<<< ApiREST.prototype.createOrReplaceRole = function (id, body) { ======= ApiREST.prototype.login = function (strategy, credentials) { var options = { url: this.apiPath('_login'), method: 'POST', json: { strategy: strategy, username: credentials.username, password: credentials.password } }; return this.callApi(options); }; ApiREST.prototype.logout = function (jwtToken) { var options = { url: this.apiPath('_logout'), method: 'GET', json: {}, headers: { authorization: 'Bearer ' + jwtToken } }; return this.callApi(options); }; ApiREST.prototype.putRole = function (id, body) { >>>>>>> ApiREST.prototype.login = function (strategy, credentials) { var options = { url: this.apiPath('_login'), method: 'POST', json: { strategy: strategy, username: credentials.username, password: credentials.password } }; return this.callApi(options); }; ApiREST.prototype.logout = function (jwtToken) { var options = { url: this.apiPath('_logout'), method: 'GET', json: {}, headers: { authorization: 'Bearer ' + jwtToken } }; return this.callApi(options); }; ApiREST.prototype.createOrReplaceRole = function (id, body) {
<<<<<<< InternalError = require('kuzzle-common-objects').errors.InternalError, ======= >>>>>>> <<<<<<< assertHasBody = require('../../util/requestAssertions').assertHasBody, assertBodyHasNotAttribute = require('../../util/requestAssertions').assertBodyHasNotAttribute, assertBodyHasAttribute = require('../../util/requestAssertions').assertBodyHasAttribute, assertHasStrategy = require('../../util/requestAssertions').assertHasStrategy, assertIsConnected = require('../../util/requestAssertions').assertIsConnected, assertIsStrategyRegistered = require('../../util/requestAssertions').assertIsStrategyRegistered, getRequestRoute = require('../../util/string').getRequestRoute; ======= { UnauthorizedError, InternalError: KuzzleInternalError } = require('kuzzle-common-objects').errors, { assertHasBody, assertBodyHasNotAttribute, assertBodyHasAttribute } = require('./util/requestAssertions'); >>>>>>> {InternalError: KuzzleInternalError} = require('kuzzle-common-objects').errors, { assertIsStrategyRegistered, assertIsConnected, assertHasBody, assertHasStrategy, assertBodyHasNotAttribute, assertBodyHasAttribute } = require('../../util/requestAssertions'), getRequestRoute = require('../../util/string').getRequestRoute; <<<<<<< * @property {Kuzzle} kuzzle ======= * @param {Kuzzle} kuzzle >>>>>>> * @param {Kuzzle} kuzzle <<<<<<< const error = new InternalError(`${getRequestRoute(request)} Error while forcing token expiration.`); ======= const error = new KuzzleInternalError('Error expiring token'); >>>>>>> const error = new KuzzleInternalError(`${getRequestRoute(request)} Error while forcing token expiration.`);
<<<<<<< }, configRepoLastParsedResultPath: (id) => { return `/go/api/internal/config_repos/${id}/last_parsed_result`; }, configRepoTriggerUpdatePath: (id) => { return `/go/api/internal/config_repos/${id}/trigger_update`; }, configRepoRevisionStatusPath: (id) => { return `/go/api/internal/config_repos/${id}/status`; ======= }, elasticProfilesPath: (profileId) => { if (profileId) { return `/go/api/elastic/profiles/${profileId}`; } else { return "/go/api/elastic/profiles"; } >>>>>>> }, configRepoLastParsedResultPath: (id) => { return `/go/api/internal/config_repos/${id}/last_parsed_result`; }, configRepoTriggerUpdatePath: (id) => { return `/go/api/internal/config_repos/${id}/trigger_update`; }, configRepoRevisionStatusPath: (id) => { return `/go/api/internal/config_repos/${id}/status`; }, elasticProfilesPath: (profileId) => { if (profileId) { return `/go/api/elastic/profiles/${profileId}`; } else { return "/go/api/elastic/profiles"; }
<<<<<<< CSS Browser Selector v0.2.9 ======= CSS Browser Selector v0.2.8 >>>>>>> CSS Browser Selector v0.2.9 <<<<<<< var css_browser_selector = function() {var ua=navigator.userAgent.toLowerCase(),is=function(t){return ua.indexOf(t) != -1;},h=document.getElementsByTagName('html')[0],b=(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?'gecko ff2':is('firefox/3')?'gecko ff3':is('gecko/')?'gecko':is('opera/9')?'opera opera9':/opera\s(\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';var c=b+os+' js'; h.className += h.className?' '+c:c;}(); ======= var css_browser_selector = function() {var ua=navigator.userAgent.toLowerCase(),is=function(t){return ua.indexOf(t) != -1;},h=document.getElementsByTagName('html')[0],b=(!(/opera|webtv/i.test(ua))&&/msie (\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?'gecko ff2':is('firefox/3')?'gecko ff3':is('gecko/')?'gecko':is('opera/9')?'opera opera9':/opera (\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('chrome')?'chrome webkit safari':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';var c=b+os+' js'; h.className += h.className?' '+c:c;}(); >>>>>>> var css_browser_selector = function() {var ua=navigator.userAgent.toLowerCase(),is=function(t){return ua.indexOf(t) != -1;},h=document.getElementsByTagName('html')[0],b=(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?'gecko ff2':is('firefox/3')?'gecko ff3':is('gecko/')?'gecko':is('opera/9')?'opera opera9':/opera\s(\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('chrome')?'chrome webkit safari':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';var c=b+os+' js'; h.className += h.className?' '+c:c;}();
<<<<<<< const withCSS = require('@zeit/next-css') ======= const markdownPluginAbbr = require('remark-abbr') const markdownPluginSectionize = require('remark-sectionize') const withMDX = require('@zeit/next-mdx')({ extension: /.mdx?$/, options: { mdPlugins: [markdownPluginAbbr, markdownPluginSectionize] } }) >>>>>>> const withCSS = require('@zeit/next-css') const markdownPluginAbbr = require('remark-abbr') const markdownPluginSectionize = require('remark-sectionize') const withMDX = require('@zeit/next-mdx')({ extension: /.mdx?$/, options: { mdPlugins: [markdownPluginAbbr, markdownPluginSectionize] } }) <<<<<<< module.exports = withCSS(withSourceMaps(withTypescript())) ======= module.exports = withMDX( withSourceMaps( withTypescript({ pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'md', 'mdx'] }) ) ) >>>>>>> module.exports = withCSS( withMDX( withSourceMaps( withTypescript({ pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'md', 'mdx'] }) ) ) )
<<<<<<< this.kuzzle.services.list.broker.add(serializedRequestObject.uniqueRoom, {error: error}); this.kuzzle.log.error(error); ======= this.kuzzle.services.list.broker.add(roomWriteResponse, {error: error}); >>>>>>> this.kuzzle.services.list.broker.add(serializedRequestObject.uniqueRoom, {error: error});
<<<<<<< EnvironmentViewCtrl.$inject = ['$scope', '$rootScope', 'environmentService', 'SweetAlert', '$resource', '$compile', 'ngDialog', '$timeout', '$sce', '$stateParams', 'DTOptionsBuilder', 'DTColumnDefBuilder']; ======= EnvironmentViewCtrl.$inject = ['$scope', '$rootScope', 'environmentService', 'SweetAlert', 'DTOptionsBuilder', 'DTColumnBuilder', '$resource', '$compile', 'ngDialog', '$timeout', 'cfpLoadingBar']; >>>>>>> EnvironmentViewCtrl.$inject = ['$scope', '$rootScope', 'environmentService', 'SweetAlert', '$resource', '$compile', 'ngDialog', '$timeout', '$sce', '$stateParams', 'DTOptionsBuilder', 'DTColumnDefBuilder']; <<<<<<< function EnvironmentViewCtrl($scope, $rootScope, environmentService, SweetAlert, $resource, $compile, ngDialog, $timeout, $sce, $stateParams, DTOptionsBuilder, DTColumnDefBuilder) { ======= function EnvironmentViewCtrl($scope, $rootScope, environmentService, SweetAlert, DTOptionsBuilder, DTColumnBuilder, $resource, $compile, ngDialog, $timeout, cfpLoadingBar) { >>>>>>> function EnvironmentViewCtrl($scope, $rootScope, environmentService, SweetAlert, $resource, $compile, ngDialog, $timeout, $sce, $stateParams, DTOptionsBuilder, DTColumnDefBuilder) { <<<<<<< vm.activeTab = $stateParams.activeTab; if (vm.activeTab !== "pending") { vm.activeTab = "installed"; } vm.currentEnvironment = {}; vm.signedMessage = ""; vm.buildEnvironment = buildEnvironment; ======= cfpLoadingBar.start(); angular.element(document).ready(function () { cfpLoadingBar.complete(); }); >>>>>>> vm.activeTab = $stateParams.activeTab; if (vm.activeTab !== "pending") { vm.activeTab = "installed"; } vm.currentEnvironment = {}; vm.signedMessage = ""; vm.buildEnvironment = buildEnvironment; <<<<<<< vm.listOfUsers = []; vm.shareEnvironmentWindow = shareEnvironmentWindow; vm.toggleSelection = toggleSelection; vm.shareEnvironment = shareEnvironment; vm.users2Add = []; vm.addUser2Stack = addUser2Stack; vm.removeUserFromStack = removeUserFromStack; vm.containersTags = containersTags; function addUser2Stack(user) { vm.users2Add.push(angular.copy(user)); for (var i = 0; i < vm.listOfUsers.length; ++i) { if (vm.listOfUsers[i].fullName === user.fullName) { vm.listOfUsers.splice (i, 1); break; } } } function removeUserFromStack(key) { vm.listOfUsers.push (vm.users2Add[key]); vm.users2Add.splice(key, 1); } /* function actionShare (data, type, full, meta) { return '<a href="" class="b-btn b-btn_blue g-left" ng-click="environmentViewCtrl.shareEnvironmentWindow(\'' + data.id + '\')" ng-show = "' + (data.status === "HEALTHY") + '">Share</a>'; }*/ vm.currentUser = {}; environmentService.getCurrentUser().success (function (data) { vm.currentUser = data; }); function shareEnvironmentWindow (environment) { vm.listOfUsers = []; vm.checkedUsers = []; environmentService.getUsers().success (function (data) { for (var i = 0; i < data.length; ++i) { if (data[i].id !== vm.currentUser.id) { vm.listOfUsers.push (data[i]); } } for (var i = 0; i < vm.listOfUsers.length; ++i) { vm.listOfUsers[i].read = true; vm.listOfUsers[i].write = true; vm.listOfUsers[i].update = true; vm.listOfUsers[i].delete = true; } environmentService.getShared (environment.id).success (function (data2) { console.log (data2); vm.users2Add = data2; for (var i = 0; i < vm.users2Add.length; ++i) { if (vm.users2Add[i].id === vm.currentUser.id) { vm.users2Add.splice (i, 1); --i; continue; } for (var j = 0; j < vm.listOfUsers.length; ++j) { if (vm.listOfUsers[j].id === vm.users2Add[i].id) { vm.users2Add[i].fullName = vm.listOfUsers[j].fullName; vm.listOfUsers.splice (j, 1); break; } } } vm.currentEnvironment = environment; ngDialog.open ({ template: "subutai-app/environment/partials/shareEnv.html", scope: $scope }); }); }); } function toggleSelection (user) { for (var i = 0; i < vm.checkedUsers.length; ++i) { if (vm.checkedUsers[i].id === user.id) { vm.checkedUsers.splice (i, 1); return; } } vm.checkedUsers.push (user); } function shareEnvironment() { var arr = []; for (var i = 0; i < vm.users2Add.length; ++i) { arr.push ({ id: vm.users2Add[i].id, read: vm.users2Add[i].read, write: vm.users2Add[i].write, update: vm.users2Add[i].update, delete: vm.users2Add[i].delete }); } environmentService.share (JSON.stringify (arr), vm.currentEnvironment.id).success(function (data) { SweetAlert.swal("Success!", "Your environment was successfully shared.", "success"); loadEnvironments(); ngDialog.closeAll(); }).error(function (data) { SweetAlert.swal("ERROR!", "Your container is safe :). Error: " + data.ERROR, "error"); }); } function actionSwitch (data, type, full, meta) { /* return '<input type = "checkbox" class = "check" ng-click="environmentViewCtrl.revoke(\''+data.id+'\') ng-checked =\'' + data.revoked + '\'>';*/ console.log (data); if (typeof (data.revoke) === "boolean") { return '<div class = "toggle"><input type = "checkbox" class="check" ng-click="environmentViewCtrl.revoke(\'' + data.id + '\')" ng-checked=\'' + data.revoke + '\'><div class = "toggle-bg"></div><b class = "b switch"></b></div>' } else { return ""; } } vm.revoke = revoke; function revoke (environmentId) { environmentService.revoke (environmentId).success (function (data) { loadEnvironments(); }); } /* var refreshTable; ======= var refreshTable; >>>>>>> vm.listOfUsers = []; vm.shareEnvironmentWindow = shareEnvironmentWindow; vm.toggleSelection = toggleSelection; vm.shareEnvironment = shareEnvironment; vm.users2Add = []; vm.addUser2Stack = addUser2Stack; vm.removeUserFromStack = removeUserFromStack; vm.containersTags = containersTags; function addUser2Stack(user) { vm.users2Add.push(angular.copy(user)); for (var i = 0; i < vm.listOfUsers.length; ++i) { if (vm.listOfUsers[i].fullName === user.fullName) { vm.listOfUsers.splice (i, 1); break; } } } function removeUserFromStack(key) { vm.listOfUsers.push (vm.users2Add[key]); vm.users2Add.splice(key, 1); } /* function actionShare (data, type, full, meta) { return '<a href="" class="b-btn b-btn_blue g-left" ng-click="environmentViewCtrl.shareEnvironmentWindow(\'' + data.id + '\')" ng-show = "' + (data.status === "HEALTHY") + '">Share</a>'; }*/ vm.currentUser = {}; environmentService.getCurrentUser().success (function (data) { vm.currentUser = data; }); function shareEnvironmentWindow (environment) { vm.listOfUsers = []; vm.checkedUsers = []; environmentService.getUsers().success (function (data) { for (var i = 0; i < data.length; ++i) { if (data[i].id !== vm.currentUser.id) { vm.listOfUsers.push (data[i]); } } for (var i = 0; i < vm.listOfUsers.length; ++i) { vm.listOfUsers[i].read = true; vm.listOfUsers[i].write = true; vm.listOfUsers[i].update = true; vm.listOfUsers[i].delete = true; } environmentService.getShared (environment.id).success (function (data2) { console.log (data2); vm.users2Add = data2; for (var i = 0; i < vm.users2Add.length; ++i) { if (vm.users2Add[i].id === vm.currentUser.id) { vm.users2Add.splice (i, 1); --i; continue; } for (var j = 0; j < vm.listOfUsers.length; ++j) { if (vm.listOfUsers[j].id === vm.users2Add[i].id) { vm.users2Add[i].fullName = vm.listOfUsers[j].fullName; vm.listOfUsers.splice (j, 1); break; } } } vm.currentEnvironment = environment; ngDialog.open ({ template: "subutai-app/environment/partials/shareEnv.html", scope: $scope }); }); }); } function toggleSelection (user) { for (var i = 0; i < vm.checkedUsers.length; ++i) { if (vm.checkedUsers[i].id === user.id) { vm.checkedUsers.splice (i, 1); return; } } vm.checkedUsers.push (user); } function shareEnvironment() { var arr = []; for (var i = 0; i < vm.users2Add.length; ++i) { arr.push ({ id: vm.users2Add[i].id, read: vm.users2Add[i].read, write: vm.users2Add[i].write, update: vm.users2Add[i].update, delete: vm.users2Add[i].delete }); } environmentService.share (JSON.stringify (arr), vm.currentEnvironment.id).success(function (data) { SweetAlert.swal("Success!", "Your environment was successfully shared.", "success"); loadEnvironments(); ngDialog.closeAll(); }).error(function (data) { SweetAlert.swal("ERROR!", "Your container is safe :). Error: " + data.ERROR, "error"); }); } function actionSwitch (data, type, full, meta) { /* return '<input type = "checkbox" class = "check" ng-click="environmentViewCtrl.revoke(\''+data.id+'\') ng-checked =\'' + data.revoked + '\'>';*/ console.log (data); if (typeof (data.revoke) === "boolean") { return '<div class = "toggle"><input type = "checkbox" class="check" ng-click="environmentViewCtrl.revoke(\'' + data.id + '\')" ng-checked=\'' + data.revoke + '\'><div class = "toggle-bg"></div><b class = "b switch"></b></div>' } else { return ""; } } vm.revoke = revoke; function revoke (environmentId) { environmentService.revoke (environmentId).success (function (data) { loadEnvironments(); }); } /* var refreshTable; <<<<<<< function actionStartEnvironmentBuild(data, type, full, meta) { return '<a href="" class="b-icon b-icon_build" ng-click="environmentViewCtrl.startEnvironmentBuild(\'' + data.id + '\')"></a>'; }*/ ======= function containersTags(data, type, full, meta) { >>>>>>> function actionStartEnvironmentBuild(data, type, full, meta) { return '<a href="" class="b-icon b-icon_build" ng-click="environmentViewCtrl.startEnvironmentBuild(\'' + data.id + '\')"></a>'; }*/ <<<<<<< containersHTML += '<a ui-sref="containers({environmentId:\'' + data.id + '\'})" ' + ' class="b-tags b-tags_' + quotaColors[type] + '" ' + 'tooltips tooltip-content=\'' + tooltipContent + '\' tooltip-hide-trigger="mouseleave click" ' + 'href="/containers/' + data.id + '"' + '>' + template + ': ' + containersTotal[template][type] ======= containersHTML += '<a ui-sref="containers({environmentId:\'' + data.id + '\'})" ' + ' class="b-tags b-tags_' + quotaColors[type] + '" ' + 'tooltips tooltip-template=\'' + tooltipContent + '\'' + '>' + template + ': ' + containersTotal[template][type] >>>>>>> containersHTML += '<a ui-sref="containers({environmentId:\'' + data.id + '\'})" ' + ' class="b-tags b-tags_' + quotaColors[type] + '" ' + 'tooltips tooltip-template=\'' + tooltipContent + '\'' + '>' + template + ': ' + containersTotal[template][type] <<<<<<< /*var containersHTML = ''; for(var i = 0; i < data.containers.length; i++) { var tooltipContent = 'IP: <b>' + data.containers[i].ip + '</b><br> Quota: <div class="b-quota-type-round b-quota-type-round_' + quotaColors[data.containers[i].type] + '"></div> <b>' + data.containers[i].type + '</b><br>State: <b>' + data.containers[i].state + '</b>'; containersHTML += '<span ' + ' class="b-tags b-tags_' + quotaColors[data.containers[i].type] + '" ' + 'tooltips tooltip-content=\'' + tooltipContent + '\' ' + '>' + '<a ui-sref="containers({environmentId:\'' + data.id + '\'})">' + data.containers[i].templateName + '</a>' + ' <a href ng-click="environmentViewCtrl.destroyContainer(\'' + data.containers[i].id + '\')"><i class="fa fa-times"></i></a>' + '</span>'; }*/ ======= >>>>>>> /*var containersHTML = ''; for(var i = 0; i < data.containers.length; i++) { var tooltipContent = 'IP: <b>' + data.containers[i].ip + '</b><br> Quota: <div class="b-quota-type-round b-quota-type-round_' + quotaColors[data.containers[i].type] + '"></div> <b>' + data.containers[i].type + '</b><br>State: <b>' + data.containers[i].state + '</b>'; containersHTML += '<span ' + ' class="b-tags b-tags_' + quotaColors[data.containers[i].type] + '" ' + 'tooltips tooltip-content=\'' + tooltipContent + '\' ' + '>' + '<a ui-sref="containers({environmentId:\'' + data.id + '\'})">' + data.containers[i].templateName + '</a>' + ' <a href ng-click="environmentViewCtrl.destroyContainer(\'' + data.containers[i].id + '\')"><i class="fa fa-times"></i></a>' + '</span>'; }*/ <<<<<<< function startEnvironmentBuild (environment) { vm.currentEnvironment = environment; ngDialog.open ({ template: "subutai-app/environment/partials/decryptMsg.html", scope: $scope }); } function buildEnvironment() { environmentService.startEnvironmentBuild (vm.currentEnvironment.id, encodeURIComponent(vm.currentEnvironment.relationDeclaration)).success(function (data) { SweetAlert.swal("Success!", "Your environment has started building.", "success"); loadEnvironments(); vm.activeTab = "installed"; ngDialog.closeAll(); }).error(function (data) { SweetAlert.swal("ERROR!", "Environment build error. Error: " + data.ERROR, "error"); }); } ======= >>>>>>> function startEnvironmentBuild (environment) { vm.currentEnvironment = environment; ngDialog.open ({ template: "subutai-app/environment/partials/decryptMsg.html", scope: $scope }); } function buildEnvironment() { environmentService.startEnvironmentBuild (vm.currentEnvironment.id, encodeURIComponent(vm.currentEnvironment.relationDeclaration)).success(function (data) { SweetAlert.swal("Success!", "Your environment has started building.", "success"); loadEnvironments(); vm.activeTab = "installed"; ngDialog.closeAll(); }).error(function (data) { SweetAlert.swal("ERROR!", "Environment build error. Error: " + data.ERROR, "error"); }); } <<<<<<< vm.setHtml = setHtml; function setHtml (html) { return $sce.trustAsHtml(html.toString()); }; ======= >>>>>>> vm.setHtml = setHtml; function setHtml (html) { return $sce.trustAsHtml(html.toString()); };
<<<<<<< .state('about', { url: '/about', templateUrl: 'subutai-app/about/partials/view.html', data: { bodyClass: '', layout: 'default' }, resolve: { loadPlugin: ['$ocLazyLoad', function ($ocLazyLoad) { return $ocLazyLoad.load([ { name: 'subutai.about', files: [ 'subutai-app/about/about.js', 'subutai-app/about/controller.js', ] } ]) }] } }); ======= .state(); $httpProvider.interceptors.push(function($q, $location) { return { 'responseError': function(rejection) { if (rejection.status == 401 && $.inArray($location.path(), ['/login']) === -1) { $location.path('/login'); } return $q.reject(rejection); } }; }); >>>>>>> .state('about', { url: '/about', templateUrl: 'subutai-app/about/partials/view.html', data: { bodyClass: '', layout: 'default' }, resolve: { loadPlugin: ['$ocLazyLoad', function ($ocLazyLoad) { return $ocLazyLoad.load([ { name: 'subutai.about', files: [ 'subutai-app/about/about.js', 'subutai-app/about/controller.js', ] } ]) }] } }); $httpProvider.interceptors.push(function($q, $location) { return { 'responseError': function(rejection) { if (rejection.status == 401 && $.inArray($location.path(), ['/login']) === -1) { $location.path('/login'); } return $q.reject(rejection); } }; });
<<<<<<< .state('about', { url: '/about', templateUrl: 'subutai-app/about/partials/view.html', data: { bodyClass: '', layout: 'default' }, resolve: { loadPlugin: ['$ocLazyLoad', function ($ocLazyLoad) { return $ocLazyLoad.load([ { name: 'subutai.about', files: [ 'subutai-app/about/about.js', 'subutai-app/about/controller.js', ] } ]) }] } }); ======= .state(); $httpProvider.interceptors.push(function($q, $location) { return { 'responseError': function(rejection) { if (rejection.status == 401 && $.inArray($location.path(), ['/login']) === -1) { $location.path('/login'); } return $q.reject(rejection); } }; }); >>>>>>> .state('about', { url: '/about', templateUrl: 'subutai-app/about/partials/view.html', data: { bodyClass: '', layout: 'default' }, resolve: { loadPlugin: ['$ocLazyLoad', function ($ocLazyLoad) { return $ocLazyLoad.load([ { name: 'subutai.about', files: [ 'subutai-app/about/about.js', 'subutai-app/about/controller.js', ] } ]) }] } }); $httpProvider.interceptors.push(function($q, $location) { return { 'responseError': function(rejection) { if (rejection.status == 401 && $.inArray($location.path(), ['/login']) === -1) { $location.path('/login'); } return $q.reject(rejection); } }; });
<<<<<<< const babelRc = JSON.parse(fs.readFileSync('.babelrc','utf8')); const pkg = require('./package.json'); ======= const babelRc = JSON.parse(fs.readFileSync('.babelrc')); let pkg = JSON.parse(fs.readFileSync('./package.json')); >>>>>>> let babelRc = JSON.parse(fs.readFileSync('.babelrc')); let pkg = JSON.parse(fs.readFileSync('./package.json')); <<<<<<< let format = process.env.FORMAT==='es' ? 'es' : 'umd'; ======= let format = process.env.FORMAT==='es' ? 'es' : 'umd'; babelRc.plugins.push('external-helpers'); >>>>>>> let format = process.env.FORMAT==='es' ? 'es' : 'umd'; babelRc.plugins.push('external-helpers'); <<<<<<< entry: 'src/index.js', sourceMap: true, moduleName: pkg.amdName, exports: format ==='es' ? null : 'default', dest: format==='es' ? pkg.module : pkg.main, format, external, ======= entry: 'src/index.js', sourceMap: true, moduleName: pkg.amdName, exports: format==='es' ? null : 'default', dest: format==='es' ? pkg['jsnext:main'] : pkg['main'], format, external, >>>>>>> entry: 'src/index.js', sourceMap: true, moduleName: pkg.amdName, exports: format==='es' ? null : 'default', dest: format==='es' ? pkg.module : pkg.main, format, external, <<<<<<< format ==='umd' && memory({ path: 'src/index', contents: "import * as lib from './index'; export default lib;" ======= format==='umd' && memory({ path: 'src/index.js', contents: "export { default } from './index';" >>>>>>> format==='umd' && memory({ path: 'src/index.js', contents: "export { default } from './index';"
<<<<<<< return ( <GUIComponent> <GreenFlag vm={this.props.vm} /> <StopAll vm={this.props.vm} /> <Stage vm={this.props.vm} /> <SpriteSelector vm={this.props.vm} openNewSprite={() => this.openModal('sprite-library')} openNewCostume={() => this.openModal('costume-library')} openNewBackdrop={() => this.openModal('backdrop-library')} /> <Blocks options={{ media: this.props.basePath + 'static/blocks-media/' }} vm={this.props.vm} /> <SpriteLibrary vm={this.props.vm} mediaLibrary={this.mediaLibrary} onRequestClose={this.closeModal.bind(this)} visible={this.state.currentModal == 'sprite-library'} key='sprite-library' /> <CostumeLibrary vm={this.props.vm} mediaLibrary={this.mediaLibrary} onRequestClose={this.closeModal.bind(this)} visible={this.state.currentModal == 'costume-library'} key='costume-library' /> <BackdropLibrary vm={this.props.vm} mediaLibrary={this.mediaLibrary} onRequestClose={this.closeModal.bind(this)} visible={this.state.currentModal == 'backdrop-library'} key='backdrop-library' /> </GUIComponent> ); ======= let { basePath, blocksProps, greenFlagProps, projectData, // eslint-disable-line no-unused-vars spriteSelectorProps, stageProps, stopAllProps, vm, ...guiProps } = this.props; blocksProps = defaultsDeep({}, blocksProps, { options: { media: basePath + 'static/blocks-media/' } }); if (this.props.children) { return ( <GUIComponent {... guiProps}> {this.props.children} </GUIComponent> ); } else { return ( <GUIComponent {... guiProps}> <GreenFlag vm={vm} {...greenFlagProps} /> <StopAll vm={vm} {...stopAllProps} /> <Stage vm={vm} {...stageProps} /> <SpriteSelector vm={vm} {... spriteSelectorProps} /> <Blocks vm={vm} {... blocksProps} /> </GUIComponent> ); } >>>>>>> let { basePath, blocksProps, greenFlagProps, projectData, // eslint-disable-line no-unused-vars spriteSelectorProps, stageProps, stopAllProps, vm, ...guiProps } = this.props; blocksProps = defaultsDeep({}, blocksProps, { options: { media: basePath + 'static/blocks-media/' } }); if (this.props.children) { return ( <GUIComponent {... guiProps}> {this.props.children} </GUIComponent> ); } else { return ( <GUIComponent {... guiProps}> <GreenFlag vm={vm} {...greenFlagProps} /> <StopAll vm={vm} {...stopAllProps} /> <Stage vm={vm} {...stageProps} /> <SpriteSelector vm={vm} {... spriteSelectorProps} /> <Blocks vm={vm} {... blocksProps} /> <SpriteLibrary vm={this.props.vm} mediaLibrary={this.mediaLibrary} onRequestClose={this.closeModal.bind(this)} visible={this.state.currentModal == 'sprite-library'} key='sprite-library' /> <CostumeLibrary vm={this.props.vm} mediaLibrary={this.mediaLibrary} onRequestClose={this.closeModal.bind(this)} visible={this.state.currentModal == 'costume-library'} key='costume-library' /> <BackdropLibrary vm={this.props.vm} mediaLibrary={this.mediaLibrary} onRequestClose={this.closeModal.bind(this)} visible={this.state.currentModal == 'backdrop-library'} key='backdrop-library' /> </GUIComponent> ); }
<<<<<<< onDeleteClick: sketchId => dispatch(uSketchDelete(sketchId)), onRenameClick: sketchId => dispatch(uiEditingOpen('sketchTitle', sketchId)), onReimportClick: sketchId => dispatch(uSketchReimport(sketchId)) ======= onDeleteClick: () => dispatch(sceneSketchDelete(sketchId)), onRenameClick: e => { e.stopPropagation() dispatch(uiEditingOpen('sketchTitle', sketchId)) }, onReimportClick: () => dispatch(sceneSketchReimport(sketchId)) >>>>>>> onDeleteClick: sketchId => dispatch(uSketchDelete(sketchId)), onRenameClick: e => { e.stopPropagation() dispatch(uiEditingOpen('sketchTitle', sketchId)) }, onReimportClick: sketchId => dispatch(uSketchReimport(sketchId))
<<<<<<< jest.mock('../src/engine/renderer', () => ({ setPostProcessing: jest.fn(), })) ======= jest.mock('../src/valueTypes/FloatValueType/container', () => null) jest.mock('../src/valueTypes/BooleanValueType/container', () => null) jest.mock('../src/valueTypes/EnumValueType/container', () => null) >>>>>>> jest.mock('../src/engine/renderer', () => ({ setPostProcessing: jest.fn(), })) jest.mock('../src/valueTypes/FloatValueType/container', () => null) jest.mock('../src/valueTypes/BooleanValueType/container', () => null) jest.mock('../src/valueTypes/EnumValueType/container', () => null)
<<<<<<< module.exports = function WriteController (kuzzle) { ======= module.exports = function WriteController(kuzzle) { >>>>>>> module.exports = function WriteController (kuzzle) { <<<<<<< .then(() => { kuzzle.pluginsManager.trigger('data:createOrUpdate', requestObject); ======= .then(function () { kuzzle.pluginsManager.trigger('data:createOrReplace', requestObject); >>>>>>> .then(() => { kuzzle.pluginsManager.trigger('data:createOrReplace', requestObject);
<<<<<<< ======= >>>>>>> <<<<<<< var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })(); ======= var _slice = Array.prototype.slice; var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); >>>>>>>
<<<<<<< }); test('named validation', function (t) { var validator = validation({ api: require('./fixtures/defs/pets.json') }); t.test('input fail (not present) includes parameter name', function (t) { t.plan(2); var parameterName = 'test_parameter_name_missing_required'; validator.make({ name: parameterName, required: true, type: 'integer' }).validate(undefined, function (error) { t.ok(error, 'error.'); t.ok(error.message.indexOf(parameterName) >= 0, 'Expected error.message to contain ' + parameterName); }); }); t.test('input fail (bad type)', function (t) { t.plan(2); var parameterName = 'test_parameter_name_wrong_type'; validator.make({ name: parameterName, required: true, type: 'integer' }).validate('hello', function (error) { t.ok(error, 'error.'); t.ok(error.message.indexOf(parameterName) >= 0, 'Expected error.message to contain ' + parameterName); }); }); t.test('input fail (not present) - parameter name in each details.message', function (t) { var parameterName = 'test_details_message_contains_parameter'; validator.make({ name: parameterName, required: true, type: 'integer' }).validate(undefined, function (error) { var numErrorDetails = error.details.length; t.plan(numErrorDetails + 1); t.ok(error, 'error.'); error.details.forEach(function (detail) { t.ok(detail.message.indexOf(parameterName) >= 0, 'Expected error.details.message to contain ' + parameterName); }); }); }); t.test('input fail (not present) - parameter name in each details.path', function (t) { var parameterName = 'test_details_path_equals_parameter'; validator.make({ name: parameterName, required: true, type: 'integer' }).validate(undefined, function (error) { var numErrorDetails = error.details.length; t.plan(numErrorDetails + 1); t.ok(error, 'error.'); error.details.forEach(function (detail) { t.ok(detail.path === parameterName, 'Expected error.details.path to equal ' + parameterName); }); }); }); ======= t.test('input ignore extra value', function(t) { t.plan(2); var v = validator.make(require('./fixtures/defs/pets.json').definitions.Pet); v.schema._settings = { allowUnknown: true, stripUnknown: true }; v.validate({ id: 1, name: 'fluffy', extra: 'foo'}, function(error, result) { t.ok(!error, 'no error.'); t.ok(!result.extra, 'No extra properties') }); }); >>>>>>> t.test('input ignore extra value', function(t) { t.plan(2); var v = validator.make(require('./fixtures/defs/pets.json').definitions.Pet); v.schema._settings = { allowUnknown: true, stripUnknown: true }; v.validate({ id: 1, name: 'fluffy', extra: 'foo'}, function(error, result) { t.ok(!error, 'no error.'); t.ok(!result.extra, 'No extra properties') }); }); }); test('named validation', function (t) { var validator = validation({ api: require('./fixtures/defs/pets.json') }); t.test('input fail (not present) includes parameter name', function (t) { t.plan(2); var parameterName = 'test_parameter_name_missing_required'; validator.make({ name: parameterName, required: true, type: 'integer' }).validate(undefined, function (error) { t.ok(error, 'error.'); t.ok(error.message.indexOf(parameterName) >= 0, 'Expected error.message to contain ' + parameterName); }); }); t.test('input fail (bad type)', function (t) { t.plan(2); var parameterName = 'test_parameter_name_wrong_type'; validator.make({ name: parameterName, required: true, type: 'integer' }).validate('hello', function (error) { t.ok(error, 'error.'); t.ok(error.message.indexOf(parameterName) >= 0, 'Expected error.message to contain ' + parameterName); }); }); t.test('input fail (not present) - parameter name in each details.message', function (t) { var parameterName = 'test_details_message_contains_parameter'; validator.make({ name: parameterName, required: true, type: 'integer' }).validate(undefined, function (error) { var numErrorDetails = error.details.length; t.plan(numErrorDetails + 1); t.ok(error, 'error.'); error.details.forEach(function (detail) { t.ok(detail.message.indexOf(parameterName) >= 0, 'Expected error.details.message to contain ' + parameterName); }); }); }); t.test('input fail (not present) - parameter name in each details.path', function (t) { var parameterName = 'test_details_path_equals_parameter'; validator.make({ name: parameterName, required: true, type: 'integer' }).validate(undefined, function (error) { var numErrorDetails = error.details.length; t.plan(numErrorDetails + 1); t.ok(error, 'error.'); error.details.forEach(function (detail) { t.ok(detail.path === parameterName, 'Expected error.details.path to equal ' + parameterName); }); }); });
<<<<<<< window.$.getJSON(this.panel.jsonUrl).then(res => { this.locations = res; this.render(); }); } else if (this.panel.locationData === 'influx') { // .. Do nothing ======= window.$.getJSON(this.panel.jsonUrl).then(res => this.reloadLocations.bind(this, res)); >>>>>>> window.$.getJSON(this.panel.jsonUrl).then(res => this.reloadLocations.bind(this, res)); } else if (this.panel.locationData === 'influx') { // .. Do nothing <<<<<<< ======= if (this.dashboard.snapshot && this.locations) { this.panel.snapshotLocationData = this.locations; } this.series = dataList.map(this.seriesHandler.bind(this)); >>>>>>> if (this.dashboard.snapshot && this.locations) { this.panel.snapshotLocationData = this.locations; } this.series = dataList.map(this.seriesHandler.bind(this));