diff --git a/src/function/sync/apply-actions/dispatch-parent-action/addcategoryapps.ts b/src/function/sync/apply-actions/dispatch-parent-action/addcategoryapps.ts index a85927a..a588681 100644 --- a/src/function/sync/apply-actions/dispatch-parent-action/addcategoryapps.ts +++ b/src/function/sync/apply-actions/dispatch-parent-action/addcategoryapps.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 - 2020 Jonas Lochmann + * Copyright (C) 2019 - 2022 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -80,6 +80,16 @@ export async function dispatchAddCategoryApps ({ action, cache, fromChildSelfLim })).map((item) => item.categoryId) if (fromChildSelfLimitAddChildUserId !== null) { + for (let i = 0; i < action.packageNames.length; i++) { + const packageName = action.packageNames[i] + + if (packageName.indexOf('@') !== -1) { + throw new SelfLimitationException({ + staticMessage: 'can not do device specific assignments as child' + }) + } + } + try { const parentCategoriesOfTargetCategory = getCategoryWithParentCategories(categoriesOfSameChild, action.categoryId) const userEntryUnsafe = await cache.database.user.findOne({