On Thu, 25 Oct 2007, S Page wrote:
> Asheesh Laroia wrote:
>> Is it possible to hide some attributes so that only admins can see
>> them?
>
> From what I know of the code, not easily. When a page is saved, SMW
> parses its annotations and stores the semantic annotations in tables.
> There's a smw_attributes table with the page ID, the property name, and
> its value. No access control at the database level.
>
> Yes, you could add a special property Only_for_admins and modify the SMW code
> to check this before it does anything with a property. SMW 1.0 tends to
> create a DataValue whenever it deals with a property so the change might be
> well-encapsulated.
>
> HOWEVER,
> Normally the User:Asheesh_Laroia page would form the subject of both the
> public Property:Email and the private Property:telephone, so both properties
> have to be specified on the same page. So how are you going to have a
> partly-private page in MediaWiki? Are you thinking of having a separate
> private details page that is somehow tied in with the public page? That
> makes querying much harder. Maybe you could have a separate namespace for
> Confidential:Asheesh_Laroia and modify SMW to look up in that as well if the
> user is an admin.
I guess another total hack is to name all the private properties similarly
and therefore detectably - and then at render time, if the user is an
admin, print those, and if the user is not, don't.
What do you [guys] make of that approach?
Thanks for the quick and thoughtful reply!
-- Asheesh.
--
Humans are communications junkies. We just can't get enough.
-- Alan Kay
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Semediawiki-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel