AKSW / OntoWiki

Semantic data wiki as well as Linked Data publishing engine
https://ontowiki.net
205 stars 51 forks source link

Repair the non-share save Query option #392

Open shinobu opened 8 years ago

shinobu commented 8 years ago

This PR intends to fix the option to "not-share" private Queries in the Query Menu

The Option is in the Query Menu for a knowledge base. On the right side is a field to save a query with a checkbox to give the choice to share it or not. This checkbox had was ignored so far and checked or not didn't make a difference. All saved queries were saved in the same knowledge base and visible for everyone.

I expected them to be only visible for the creator (if the box was checked prior to saving).

I just fixed the errors in the existing implementation (the button was only deactivated in the extensions/queries/resources/savepartial.js) and added a proper authentication check.

Now it creates properly an extra knowledge base for the user queries if he doesn't want do share them. This doesn't seem to be supported in the extensions that work with saved queries though. Hence i would say that we should probably think how and If we want to support this feature and add support for it in the extensions, that work with saved queries as needed.

pfrischmuth commented 8 years ago

TODOs (as discussed via Skype):

shinobu commented 8 years ago

Done @pfrischmuth

shinobu commented 8 years ago

@pfrischmuth isActionAllowed did return null as false in my tests. I doubt it is testet. I guess we should then add the case as well, that the user has no rights to create a knowledge base, but one for the user exists to save (created from the Admin for that purpose?).

shinobu commented 8 years ago

I added a case for non-writable db's, but I don't know how to make a db unwriteable, so I couldn't test the functionality.

shinobu commented 8 years ago

Tested With Non-Editable, Editable, Without AC Rights, Without AC Rights with QDB and with AC Rights

white-gecko commented 7 years ago

@shinobu, please update the description of this issue/pull request,