goblin-desktop 3.0.2 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.zou-flow CHANGED
@@ -1,3 +1,2 @@
1
1
  [update-version]
2
- freezed = true
3
2
  package-json = package.json
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "goblin-desktop",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "description": "Goblin Desktop",
5
5
  "main": "./builders/builders.js",
6
6
  "scripts": {
@@ -311,6 +311,13 @@ Goblin.registerQuest(goblinName, 'add-workitem', function* (
311
311
  return;
312
312
  }
313
313
 
314
+ if (!workitem.mode) {
315
+ //force readonly when adding a workitem without WORKSHOP_EDIT skills
316
+ if (!quest.user.canDo(`${workitem.name}.edit`)) {
317
+ workitem.mode = 'readonly';
318
+ }
319
+ }
320
+
314
321
  const desktopId = quest.goblin.id;
315
322
  const widgetId = `${workitem.name}@${desktopId}@${workitem.id}`;
316
323