On 08/31/2011 11:08 AM, Marius Dumitru Florea wrote:
On Wed, Aug 31, 2011 at 11:41 AM, Anca
Luca<lucaa(a)xwiki.com> wrote:
Off the top of my head:
On 08/31/2011 10:16 AM, Marius Dumitru Florea wrote:
Hi devs,
I need your feedback regarding two use cases:
(A) /view/Space1/PageWithPR?sheet=Space2.SheetWithoutPR
Drop permissions when rendering the sheet, right?
it only seems normal to me
too...
(B)
/view/Space1/PageWithoutPR?sheet=Space2.SheetWithPR
How often did you write class/document sheets requiring programming
rights?
The pb is not how often, but if there's one usecase and we'd make
it
impossible by this approach, without having a workaround for it. I think
there might be cases when you need a sheet with programming rights...
I don't think it's possible/safe to keep
PageWithoutPR as
context document and render SheetWithPR using programming rights.
I cannot think of usecases right now, but I would make it behave like
{{include}} with context=old, because this is the way we used sheets
before... (which I think means not having pr for Space2.SheetWithPR)
So rendering
the Space2.SheetWithPR without programming rights when
the target document doesn't have programming rights is acceptable in
your opinion right?
I tend to think the same as Jerome and Denis there, I can see usecases
when the sheet needs PR and the document cannot have them.
Also, yes, I think there might be some room for exploits there if we use
the sheet rights and not the doc rights, _although_ we can consider this
is the responsibility of the sheet author (e.g. if you execute stuff
from the including doc, you need to make sure that the stuff that you
execute is not dangerous).
If we don't allow pr in the case of B, it would be interesting to see if
there would be a workaround for these cases, I.e. if you need to write
an app where the sheet needs programming rights but the doc cannot have
them (since they are docs created by the users), do you have some other
way of displaying a doc through a sheet, not using this param?
So, to answer your question, I'm not that sure anymore that it's
acceptable...
Initially I had thought that it makes sense for this to have the same
behaviour as the include macro (because that's what we use now), but
actually it has nothing to do with the include macro. We used include
macro for sheets because we didn't have a better way, but actually the
include macro is not a sheet specific solution, it is just a generic
macro to include a doc in another one, which happens to be applied for
the sheets system. If this is for building a sheet specific system, we
can define a new behaviour, where the rights of the sheet win.
in a word, I have no idea, I am aware that there are usecases for using
prog rights for B and I would like to not forbid them because we might
not be able to do some things and use some API that we could before (i'm
afraid that the general direction of preventing PR everywhere because
bad things might happen takes us to a place where we cannot actually use
them anywhere).
Thanks,
Anca
I suppose that when you create a sheet that requires
programming
rights you make sure all pages that use that sheet have also
programming rights.
Thanks,
Marius
Happy coding,
Anca
WDYT?
Thanks,
Marius
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs