[API] Deprecate Api.checkProgrammingRights?
Hi, I'd like to deprecate Api.checkProgrammingRights() in favor of Api.hasProgrammingRights(). It's not normal that we have 2 APIs for doing the same thing and none of them being deprecated. Is that ok for everyone? Thanks -Vincent ___________________________________________________________________________ Yahoo! Mail r�invente le mail ! D�couvrez le nouveau Yahoo! Mail et son interface r�volutionnaire. http://fr.mail.yahoo.com
+1 On 2/2/07, Vincent Massol <vincent@massol.net> wrote:
Hi,
I'd like to deprecate Api.checkProgrammingRights() in favor of Api.hasProgrammingRights(). It's not normal that we have 2 APIs for doing the same thing and none of them being deprecated.
Is that ok for everyone?
Thanks -Vincent
___________________________________________________________________________ Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire. http://fr.mail.yahoo.com
-- You receive this message as a subscriber of the xwiki-dev@objectweb.org mailing list. To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- jeremi
+1 2007/2/2, Vincent Massol <vincent@massol.net>:
Hi,
I'd like to deprecate Api.checkProgrammingRights() in favor of Api.hasProgrammingRights(). It's not normal that we have 2 APIs for doing the same thing and none of them being deprecated.
Is that ok for everyone?
Thanks -Vincent
___________________________________________________________________________ Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire. http://fr.mail.yahoo.com
-- You receive this message as a subscriber of the xwiki-dev@objectweb.org mailing list. To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
+1 I would also vote to deprecate Api.hasProgrammingRights in favor of XWiki.hasProgrammingRights() if it is possible.. It's not a very good idea to have these APIs in Api.. I don't know why I had this crazy idea Ludovic Jean-Vincent Drean a écrit :
+1
2007/2/2, Vincent Massol <vincent@massol.net>:
Hi,
I'd like to deprecate Api.checkProgrammingRights() in favor of Api.hasProgrammingRights(). It's not normal that we have 2 APIs for doing the same thing and none of them being deprecated.
Is that ok for everyone?
Thanks -Vincent
___________________________________________________________________________
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire. http://fr.mail.yahoo.com
-- You receive this message as a subscriber of the xwiki-dev@objectweb.org mailing list. To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
------------------------------------------------------------------------
-- You receive this message as a subscriber of the xwiki-dev@objectweb.org mailing list. To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- Ludovic Dubost Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost AIM: nvludo Yahoo: ludovic
On Feb 2, 2007, at 2:47 PM, Ludovic Dubost wrote:
+1
I would also vote to deprecate Api.hasProgrammingRights in favor of
XWiki.hasProgrammingRights()
if it is possible.. It's not a very good idea to have these APIs in Api.. I don't know why I had this crazy idea
yes, I completely agree :-) I thought it was strange too... Let's do it in 2 steps as the second refactoring might be more complex (I'll look into it). Thanks -Vincent
Jean-Vincent Drean a écrit :
+1
2007/2/2, Vincent Massol <vincent@massol.net>:
Hi,
I'd like to deprecate Api.checkProgrammingRights() in favor of Api.hasProgrammingRights(). It's not normal that we have 2 APIs for doing the same thing and none of them being deprecated.
Is that ok for everyone?
Thanks -Vincent
____________________________________________________________________ _______ Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire. http://fr.mail.yahoo.com
-- You receive this message as a subscriber of the xwiki- dev@objectweb.org mailing list. To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http:// www.objectweb.org/wws
--------------------------------------------------------------------- ---
-- You receive this message as a subscriber of the xwiki- dev@objectweb.org mailing list. To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http:// www.objectweb.org/wws
-- Ludovic Dubost Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost AIM: nvludo Yahoo: ludovic
-- You receive this message as a subscriber of the xwiki- dev@objectweb.org mailing list. To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/ wws
___________________________________________________________________________ Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire. http://fr.mail.yahoo.com
On Feb 2, 2007, at 2:57 PM, Vincent Massol wrote:
On Feb 2, 2007, at 2:47 PM, Ludovic Dubost wrote:
+1
I would also vote to deprecate Api.hasProgrammingRights in favor of
XWiki.hasProgrammingRights()
if it is possible.. It's not a very good idea to have these APIs in Api.. I don't know why I had this crazy idea
yes, I completely agree :-) I thought it was strange too...
Let me rephrase that... I agree within the current architecture. I really don't agree that there should be APIs for all possible stuff located in XWiki (i.e. flatten the object tree). My preference would be to have components and that each component has a public API and that API be available from velocity or groovy. We are already stretching the XWiki object too much. Thus any rights check should be done through the Rights manager component. Something like: $container.lookup ("com.xpn.xwiki....RightsManager").hasProgrammingRights() Of course we could register some well known components: $rightsManager.hasProgrammingRights() In Java: public class MyClassRequiringRightsVerifications ... { private RightsManager; ... } Then MyClassRequiringRightsVerifications is registered againt the component manager (Plexus, OSGi, etc) with a dependency on the RightsManager component so that it's injected either in the constructor, in setters or in the field. This is what I'd like to do for XWiki 2.0. Thanks -Vincent
Let's do it in 2 steps as the second refactoring might be more complex (I'll look into it).
Thanks -Vincent
Jean-Vincent Drean a écrit :
+1
2007/2/2, Vincent Massol <vincent@massol.net>:
Hi,
I'd like to deprecate Api.checkProgrammingRights() in favor of Api.hasProgrammingRights(). It's not normal that we have 2 APIs for doing the same thing and none of them being deprecated.
Is that ok for everyone?
Thanks -Vincent
___________________________________________________________________ ________ Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire. http://fr.mail.yahoo.com
-- You receive this message as a subscriber of the xwiki- dev@objectweb.org mailing list. To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http:// www.objectweb.org/wws
-------------------------------------------------------------------- ----
-- You receive this message as a subscriber of the xwiki- dev@objectweb.org mailing list. To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http:// www.objectweb.org/wws
-- Ludovic Dubost Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost AIM: nvludo Yahoo: ludovic
-- You receive this message as a subscriber of the xwiki- dev@objectweb.org mailing list. To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http:// www.objectweb.org/wws
______________________________________________________________________ _____ Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire. http://fr.mail.yahoo.com
-- You receive this message as a subscriber of the xwiki- dev@objectweb.org mailing list. To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/ wws
___________________________________________________________________________ Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire. http://fr.mail.yahoo.com
Ludovic Dubost a écrit :
+1
I would also vote to deprecate Api.hasProgrammingRights in favor of
XWiki.hasProgrammingRights()
if it is possible.. It's not a very good idea to have these APIs in Api.. I don't know why I had this crazy idea
+1 And what do you think of : xwiki.user.hasProgrammingRights() ? S.
On Feb 2, 2007, at 7:53 PM, Sébastien Gaïde wrote:
Ludovic Dubost a écrit :
+1 I would also vote to deprecate Api.hasProgrammingRights in favor of XWiki.hasProgrammingRights() if it is possible.. It's not a very good idea to have these APIs in Api.. I don't know why I had this crazy idea
+1
And what do you think of :
xwiki.user.hasProgrammingRights() ?
I think Rights is a cross cutting concern that spans across both Users and Documents (and possibly other stuff too). I would definitely see it as a component in itself and not inside either User nor Documents. In this way it's nicely decoupled and could be implemented in different manner in the future: using a rule engine, using AOP, etc. Thanks -Vincent ___________________________________________________________________________ Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire. http://fr.mail.yahoo.com
Vincent Massol a écrit :
On Feb 2, 2007, at 7:53 PM, Sébastien Gaïde wrote:
And what do you think of :
xwiki.user.hasProgrammingRights() ?
I think Rights is a cross cutting concern that spans across both Users and Documents (and possibly other stuff too). I would definitely see it as a component in itself and not inside either User nor Documents.
In this way it's nicely decoupled and could be implemented in different manner in the future: using a rule engine, using AOP, etc.
I totally agree with this. But in the context of a page content/xwiki application writer, what do you think is more natural : - xwiki.user.hasProgrammingRights() or - rightManager.hasProgrammingRights() ? I like the first solution, because the right is associated to the user, and that fact is clearly expressed, even if the logic of the right management is delegated to a RightManagement entity under the hood (that's what an API is made for, isn't it ? ;-) ). S.
I really don't agree that there should be APIs for all possible stuff located in XWiki (i.e. flatten the object tree).
My preference would be to have components and that each component has a public API and that API be available from velocity or groovy. We are already stretching the XWiki object too much. Thus any rights check should be done through the Rights manager component.
I was going to say something like that, too. This is what I'd like to see
for XWiki 2.0.
And what do you think of :
xwiki.user.hasProgrammingRights() ?
I think Rights is a cross cutting concern that spans across both Users and Documents (and possibly other stuff too). I would definitely see it as a component in itself and not inside either User nor Documents.
In this way it's nicely decoupled and could be implemented in different manner in the future: using a rule engine, using AOP, etc.
I totally agree with this. But in the context of a page content/xwiki application writer, what do you think is more natural :
- xwiki.user.hasProgrammingRights()
or
- rightManager.hasProgrammingRights()
?
I like the first solution, because the right is associated to the user, and that fact is clearly expressed, even if the logic of the right management is delegated to a RightManagement entity under the hood (that's what an API is made for, isn't it ? ;-) ).
I'd say both functions are useful, but not necessary. But this is something particular, meaning that no other APIs should alter existing APIs, so that different modules can be easily decoupled. So, I'd say that by XWiki 2.0 we should have the second method, and add the first method only if many developers want it. -- http://purl.org/net/sergiu
On Feb 2, 2007, at 8:29 PM, Sébastien Gaïde wrote:
Vincent Massol a écrit :
On Feb 2, 2007, at 7:53 PM, Sébastien Gaïde wrote:
And what do you think of :
xwiki.user.hasProgrammingRights() ? I think Rights is a cross cutting concern that spans across both Users and Documents (and possibly other stuff too). I would definitely see it as a component in itself and not inside either User nor Documents. In this way it's nicely decoupled and could be implemented in different manner in the future: using a rule engine, using AOP, etc.
I totally agree with this. But in the context of a page content/xwiki application writer, what do you think is more natural :
- xwiki.user.hasProgrammingRights()
or
- rightManager.hasProgrammingRights()
?
I like the first solution, because the right is associated to the user, and that fact is clearly expressed, even if the logic of the right management is delegated to a RightManagement entity under the hood (that's what an API is made for, isn't it ? ;-) ).
Maybe... So rightsManager.hasRight(Rights, User, Document) would be called by user.hasProgrammingRights(Rights.PROGRAMMING, Document). With this thinking, we could go one step further and have xwiki.hasProgrammingRights() without any parameter and it would call rightsManager.hasRight() with the current document and the current user... Back to square 1... ;-) Alternatively we could move all this in: xwiki.rights.hasProgrammingRights() (or rights.hasProgrammingRights ()) which would take no parameter (the context would be passed to it). -Vincent ___________________________________________________________________________ Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire. http://fr.mail.yahoo.com
participants (6)
-
Jean-Vincent Drean -
jeremi joslin -
Ludovic Dubost -
Sergiu Dumitriu -
Sébastien Gaïde -
Vincent Massol