Closed (fixed)
Project:
conStruct
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Mar 2010 at 12:23 UTC
Updated:
1 Aug 2011 at 21:49 UTC
The Resource class needs to be able to retrieve labels for non-literal triple objects from the 'local' 3store when available, even if they're not in the same dataset as the resource.
Resource __construct needs to be able to lookup an object URI from any dataset and retrieve the label.
If the user isn't authorized to view data from a particular dataset, the URI should be displayed with no link and there should be some notification to them that they're not authorized.
If the URI can't be retrieved from the local 3store, the URI should be displayed with no link
Comments
Comment #1
fgiasson commentedThere are two things here: one related to conStruct (the icon in the templates) & the Resource class, and one related to structWSF.
What is needed here is to upgrade the CrudRead web service endpoint so that we don't have to specify any dataset. If no dataset are mentioned, then it tells the service that the requester doesn't know the dataset where the target URI is archived. This is like when one doesn't specify a named graph for a sparql query.
To make it happen, we first have to change the default value of the "dataset" parameter to accept no value for this parameter. Then, we have to use the AuthLister web service to list all datasets accessible (Read permissions) by the requester. Then, we will use these URIs to read the Record. If the user doesn't have access to the dataset where the record is indexed, then an error (or empty resultset) will be returned to the user.
The general idea is:
(conStruct) Resource.php[141]: remove the "dataset" parameter
(structWSF) CrudRead.php[153]: If $dataset == "", query AuthLister to get all datasets accessible by the requester. Then populate $this->dataset with all these dataset URI (urlencoded) seperated by a ";".
Then if AuthLister send an error for some reason, send an error from CrudRead, and stop its execution.
Otherwise, everything will fit together just by manipulating this variable in the constructor of the web service endpoint.
NOTE: this can be applied to other structWSF web service endpoints as well.
Comment #2
fgiasson commentedFixed in the latest template update (and the latest VisualBinder.php commit).