Ticket #974 (closed Enhancement: worksforme)

Opened 8 years ago

Last modified 8 years ago

dm4-core: privilegd assign to workspace method should fail hard for subsequent calls on same topic

Reported by: Malte Owned by: jri
Priority: Minor Milestone: Release 4.8.1
Component: DeepaMehta Standard Distribution Version: 4.8
Keywords: Cc: jri
Complexity: 3 Area: Application Framework / API
Module: deepamehta-core

Description

Instead of leaving developers with a potentially inconsistent DB state the privileged "assignToWorkspace()" method, IMO could directly faild hard if used twice on the same topic.

I initially thought, the method is just a privileged equivalent to WorkspaceService?.assignToWorkspace() but it ain't - raising an exception might make this clearer to plugin developers while they are using it for the first time.

What was the reasoning behind not allowing plugin developer to use this call to modify/change existing workspaceAssignments too?

Thanks for your help!

API-Doc:
https://api.deepamehta.de/deepamehta/4.8.1-SNAPSHOT/de/deepamehta/core/service/accesscontrol/AccessControl.html

Change History

comment:1 Changed 8 years ago by Malte

  • Status changed from new to closed
  • Resolution set to worksforme

My proposal to let it raise an exception in this case is probably not the nicest idea, too.
I would wish for having the method signature changed to something containing the "initialize" or "init" assignment to workspace, that would clear things up for the caller. Sorry, i know this is not really an issue and after read the API docs things anyway cleared up. So i would say everything is fine with here. Closing ticket as "worksforme".

Note: See TracTickets for help on using tickets.