[deepamehta-devel] Upgrading a plugin to the more collaborative DM 4.5

mre at deepamehta.de mre at deepamehta.de
Tue Jun 9 12:57:26 CEST 2015


Hey there,

here are some thoughts or questions i wanted to share with the dm-core
developers so my understanding of this is right before i start to implement
the changes across all my plugins.

1 I got an no read permission error when fetching user-topic "admin" in my
old migration code. The plugin sets up "admin" as the first member of a new
"Wikidata"-workspace (if the other wikidata plugin has not already done
so). Now i  guess i have to use the WorkspaceService in my Migration and
make admin "join" my workspace, right? OK, good.

Checking the source code i see that there is no such thing provided by the
WorkspaceService but the AccessControlService has a "createMembership" and
a "isMember" method - so i will go with these and assume that is the
envisioned way.

2 I often install/migrate (in nearly all my plugins) configuration topics
so the user ("admin" resp.) has the chance to adjust the behaviour of the
plugin, e.g. in the wikidata dump import settings etc. pp.

To get this right (=the needed "edit"-functionality for some user like
e.g. "admin") the way i understand the new ACL features in 4.5, the
cleanest and possible most future-proof way would be to assign all my topic
instances to:

2.1) a workspace where members have "edit" permissions on topics and 
2.2) make sure that "admin" is a member of that very workspace. 

Another question:
Since there is now a "System" workspace suggesting by its permissions to
cover exactly the scope of administering certain system-wide settings of a
plugin - i could also discard my custom workspace and assign my config
topics to this, no good?

Last question before the last:
The most easy type assignment for me would be to assign all my "custom
type definitions directly to the "DeepaMehta" workspace, right?
What would be the benefit (for end-users from their experience) when i
assign all types of a plugin to a custom workspace?
Or in other words: How does my choice (as a plugin dev) on the relation of
"custom types and their relation to a workspace" affect other plugin devs
and normal users of DM 4.5? Of course i would like to learn more about the
effects of my choices in advance.

And the special case of the dm4-sign-up module, open question:
To which workspace should a self-registered user account become assigned
during creation (there must be one) and would you want to be able to
configure one (or more) workspace uris for which the self-registrant will
get automatically a membership?

Thankful for your comment.

Cheers!

-- 
<www.mikromedia.de>





More information about the devel mailing list