Hi, On Thu, Jun 18, 2015 at 11:56 PM, dmeiser420 <[email protected]> wrote:
We need to give groups rights to view only specific documents within spaces. Not all documents in the space, and far less documents than total documents in the space. It appears to me that documents receive, by default, the permissions of the space. It also appears that the user needs at least view permissions on the space to view documents they have permissions to.
So, here is the question:
1. Can I set the default page permissions for a space to be different from the space permissions (eg - allow all users permission to view the space, but new documents in that space would not have that right)? (This is the preferable option)
If you set space permissions, they will affect both current and future pages in the space. Basically, you need to shift you perception. To achieve what you want, you need to set the space rights to deny access to your users, since that is what you want to do for new documents automatically. Then, for the existing pages that you want to allow access, you need to set the page level rights that will override the space rights. So the logic is: deny everything now and in the future, but allow some exceptions (which are the current documents, hand-picked for exclusion). You can write a velocity script, in case you have many current documents, to add the page level right overrides. The other option is to better manage your documents. You could simply move all the documents that are to be accessible to a space where you set the space rights to allow and, for the documents that are not to be accessed, use a different space that has space rights to deny. Much simpler and hassle free, as managing many space-level right overrides could be a bit of a pain.
2. Can I use a velocity script to generate a list of documents the group has access to?
Of course you can: Just iterate over all the docs in a space and, for each, check the rights of the group on the document. To check the rights, something like: $services.security.authorization.hasAccess("VIEW", groupDocumentReference, documentReference) ...should work. Hope this helps, Eduard
-- View this message in context: http://xwiki.475771.n2.nabble.com/Rights-Question-tp7595210.html Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users