Skip to content

Commit c62a60c

Browse files
authored
Merge pull request #7124 from Countly/ar2rsawseen/master2
app id validations
2 parents bbb48bb + 9da0bab commit c62a60c

14 files changed

Lines changed: 6 additions & 3278 deletions

File tree

api/parts/mgmt/event_groups.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const create = (params) => {
6464
const update = (params) => {
6565
if (params.qstring.args) {
6666
params.qstring.args = JSON.parse(params.qstring.args);
67-
common.db.collection(COLLECTION_NAME).update({'_id': params.qstring.args._id}, {$set: params.qstring.args}, (error) =>{
67+
common.db.collection(COLLECTION_NAME).updateOne({'_id': params.qstring.args._id, app_id: params.qstring.app_id}, {$set: params.qstring.args}, (error) =>{
6868
if (error) {
6969
common.returnMessage(params, 500, `error: ${error}`);
7070
return false;
@@ -78,7 +78,7 @@ const update = (params) => {
7878
params.qstring.event_order.forEach(function(id, index) {
7979
bulkArray.push({
8080
'updateOne': {
81-
'filter': { '_id': id },
81+
'filter': { '_id': id, app_id: params.qstring.app_id },
8282
'update': { '$set': { 'order': index } }
8383
}
8484
});
@@ -95,7 +95,7 @@ const update = (params) => {
9595
params.qstring.update_status = JSON.parse(params.qstring.update_status);
9696
params.qstring.status = JSON.parse(params.qstring.status);
9797
var idss = params.qstring.update_status;
98-
common.db.collection(COLLECTION_NAME).update({ _id: { $in: params.qstring.update_status } }, { $set: { status: params.qstring.status } }, {multi: true}, function(error) {
98+
common.db.collection(COLLECTION_NAME).update({ _id: { $in: params.qstring.update_status }, app_id: params.qstring.app_id }, { $set: { status: params.qstring.status } }, {multi: true}, function(error) {
9999
if (error) {
100100
common.returnMessage(params, 500, `error: ${error}`);
101101
return false;
@@ -154,7 +154,7 @@ const update = (params) => {
154154
const remove = async(params) => {
155155
params.qstring.args = JSON.parse(params.qstring.args);
156156
var idss = params.qstring.args;
157-
common.db.collection(COLLECTION_NAME).remove({_id: { $in: params.qstring.args }}, (error) =>{
157+
common.db.collection(COLLECTION_NAME).remove({_id: { $in: params.qstring.args }, app_id: params.qstring.app_id}, (error) =>{
158158
if (error) {
159159
common.returnMessage(params, 500, `error: ${error}`);
160160
return false;

plugins/data-manager/api/api.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ plugins.register("/i/data-manager/category/edit", function(ob) {
162162
bulkArray.push({
163163
'updateOne': {
164164
'filter': {
165-
'_id': id
165+
'_id': id,
166+
app: appId
166167
},
167168
'update': {
168169
'$set': {

plugins/old-ui-compatibility/api/api.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

plugins/old-ui-compatibility/frontend/app.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

plugins/old-ui-compatibility/frontend/public/javascripts/countly.models.js

Whitespace-only changes.

plugins/old-ui-compatibility/frontend/public/javascripts/countly.views.js

Whitespace-only changes.

plugins/old-ui-compatibility/frontend/public/javascripts/jquery.colorpicker.js

Lines changed: 0 additions & 3224 deletions
This file was deleted.

plugins/old-ui-compatibility/frontend/public/localization/old-ui-compatibility.properties

Lines changed: 0 additions & 4 deletions
This file was deleted.

plugins/old-ui-compatibility/frontend/public/stylesheets/main.css

Whitespace-only changes.

plugins/old-ui-compatibility/install.js

Whitespace-only changes.

0 commit comments

Comments
 (0)