glenn_engel(a)agilent.com wrote:
Hi,
I'm wondering how xwiki applies permissions to various actions. For example, in
looking at the ViewAction and DeleteAction classes I don't see anything that would be
applying permissions but clearly some part of the system knows that a /view/ action is
different than a /delete/ which is different from a /viewrev/.
I created my own action and it 'appears' to be applying the edit permissions.
How is this done? What if it was a view type of action?
As Guillaume said, the class that assigns edit rights to actions is in
http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-core/src/main/…
(look at the actionMap). Unfortunately, this map is not
modular/extensible, so you will have to change this class and use a
custom build of it in your wiki. This will change in the future, but it
will take a while until then.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/