Ticket #458 (closed Defect: fixed)

Opened 11 years ago

Last modified 11 years ago

user related API access: getTopicsByOwner(), getTopicsByCreator()

Reported by: Malte Owned by: jri
Priority: Major Milestone:
Component: DeepaMehta Standard Distribution Version: 4.1
Keywords: Cc: jri, Malte, dgf
Complexity: 3 Area: Application Framework / API
Module: deepamehta-accesscontrol

Description

Is there such thing already available by means of any kind of public service method?

I am hesitating, since ACL entries keep this information, to build up "creator" and "modifier" related semantics on top of DM with my application plugin.

Feedback within the next 5 days would be very much appreciated, then I've to make a decision.

Change History

comment:1 Changed 11 years ago by jri

For the moment there are no methods like getTopicsByOwner() and getTopicsByCreator().

As you said, the "creator" and "owner" information is stored not as topics but as node properties. Currently DM does not index node properties at all. Thus by-creator or by-owner queries are not possible.

Generally I think DM needs an indexing facility for node properties as well, and corresponding Core API extensions. This would provide the basis also for e.g. performing timestamp-based queries (timestamps are best represented as properties I guess).

I would like to discuss the next core development priorities around May 22 (that is after the MMS article and Dev-Meeting). A node properties indexing facility could be the priority then. Realization would take about 2 weeks (including the migrations for existing data).

So, unfortunatley no quick solution here.

Thank you for bringing up this crucial topic!

comment:2 Changed 11 years ago by jri

  • Cc dgf added

comment:3 Changed 11 years ago by jri

  • Status changed from new to accepted
  • Owner set to jri

Meanwhile we have an indexing facility for node properties, see #490, so we're ready to extend the Access Control service by getTopicsByOwner() and getTopicsByCreator() methods. I'll implement them quickly.

comment:4 Changed 11 years ago by jri

  • Status changed from accepted to closed
  • Resolution set to fixed

Access Control: add retrieval methods (#458).

There are methods for retrieving topics/associations based on creator/owner.

Access Control service:

  • Collection<Topic> getTopicsByCreator(String username)
  • Collection<Topic> getTopicsByOwner(String username)
  • Collection<Association> getAssociationsByCreator(String username);
  • Collection<Association> getAssociationsByOwner(String username);

REST API:

  • GET /accesscontrol/creator/{username}/topics
  • GET /accesscontrol/owner/{username}/topics
  • GET /accesscontrol/creator/{username}/assocs
  • GET /accesscontrol/owner/{username}/assocs

Note: these methods rely on the property index recently introduced (4.1.1-SNAPSHOT).
Topics/associations existing in a DM 4.1 installation are not indexed retrospectively.

Close #458.

Changeset: d1d5ea19d99957e45ac7c689ce142c490408bd60

comment:5 Changed 11 years ago by jri

Access Control: namespace properties (#491, #458).

DB property keys are namespaced:

  • "creator" -> "dm4.accesscontrol.creator"
  • "owner" -> "dm4.accesscontrol.owner"
  • "acl" -> "dm4.accesscontrol.acl"

A migration that transforms the DM 4.1 property keys is included.
Note: while migrating the "creator" and "owner" values are indexed. So the new user-based retrieval methods can be used also when updating from DM 4.1 (#458).

See #491.
See #458.

Changeset: 5a4fde7fa5d53102e599b82d5de3b7d0aaa12809

Note: See TracTickets for help on using tickets.