[xwiki-devs] Rights Management API
Hello, In order to implement the Rights Management desired improvements, we concluded that there is need to write an api to help retrieve: - the local / global users - the local / global groups - the inherited rights for users / groups So after I spoke with Ludovic and Thomas, here is the list of things to be implemented in this api: XWikiUser ============ We have: -> user (string) -> main (boolean) --> setUser, getUser --> isMain, setMain ---------------------------- We will need to do: --> add methods: * getAllActiveUsers [ will read xwiki settings to know what to return, global or local active users; Thomas and I understood that 'active' user means the user after being registered and confirmed the registration through email maybe, following a link to activate or something like this ] * getAllGlobalUsers * getAllLocalUsers * getAllUsers * getMatchingActiveUsers(string MatchText, XWikiContext) * a method to get details for a user, other than the ones returned by getAllUsers (which will return something like Xwiki.LudovicDubost); we might need firstname, lastname, pagename etc. maybe we can use a parameter for the getAllUsers method, called 'withDetails'(boolean) XWikiGroupService (interface) ============================= We have --> listGroupsForUser --> addUserToGroup --> listMemberForGroup --> listAllGroups ------------------------- We will need to do: --> add methods: * getAllActiveGroups * getAllGlobalGroups * getAllLocalGroups [ this is currently done by 'listAllGroups' ] * listMatchingActiveGroups(string MatchText, XWikiContext) [ this will help me for the ajax-suggest feature; will return the groups with the name matching a certain string ] XWikiRightService (interface) ============================== We have: --> checkAccess --> hasAccessLevel --> hasProgrammingRights (2 methods) --> hasAdminRights --> listAllLevels ------------------------------- We will need to do: --> add methods: * to find inherited rights * and maybe other things, I'm not very sure yet I hope I understood right. Thomas will try to draw some schemes and I'll clarify some of the questions that are left, then. Ps. I posted this mail yesterday but only today I found out that devs list moved to xwiki.org. Sorry about the delay.
Hi, This looks good.. I'm wondering wether the API should be in XWikiGroupService or if we should add a new XWikiUserService api. Concerning retrieving inherited rights we could have this API Map getInheritedRight(String SpaceOrPage, List rights ("view", "edit", "comment", ..)) It would return a Map of Lists { "view" : { "XWiki.XWikiAllGroup", "XWiki.XWikiGuest" }, "edit": {"XWiki.AdminGrgoup", "XWiki.LudovicDubost" } } If the list is empty at the parent level it will need to go at the upper parent level (until it hits the global level). Ludovic Evelyne24 a écrit :
Hello,
In order to implement the Rights Management desired improvements, we concluded that there is need to write an api to help retrieve: - the local / global users - the local / global groups - the inherited rights for users / groups
So after I spoke with Ludovic and Thomas, here is the list of things to be implemented in this api:
XWikiUser ============ We have: -> user (string) -> main (boolean) --> setUser, getUser --> isMain, setMain ---------------------------- We will need to do: --> add methods: * getAllActiveUsers [ will read xwiki settings to know what to return, global or local active users; Thomas and I understood that 'active' user means the user after being registered and confirmed the registration through email maybe, following a link to activate or something like this ] * getAllGlobalUsers * getAllLocalUsers * getAllUsers * getMatchingActiveUsers(string MatchText, XWikiContext) * a method to get details for a user, other than the ones returned by getAllUsers (which will return something like Xwiki.LudovicDubost); we might need firstname, lastname, pagename etc. maybe we can use a parameter for the getAllUsers method, called 'withDetails'(boolean)
XWikiGroupService (interface) ============================= We have --> listGroupsForUser --> addUserToGroup --> listMemberForGroup --> listAllGroups ------------------------- We will need to do: --> add methods: * getAllActiveGroups * getAllGlobalGroups * getAllLocalGroups [ this is currently done by 'listAllGroups' ] * listMatchingActiveGroups(string MatchText, XWikiContext) [ this will help me for the ajax-suggest feature; will return the groups with the name matching a certain string ]
XWikiRightService (interface) ============================== We have: --> checkAccess --> hasAccessLevel --> hasProgrammingRights (2 methods) --> hasAdminRights --> listAllLevels ------------------------------- We will need to do: --> add methods: * to find inherited rights * and maybe other things, I'm not very sure yet
I hope I understood right. Thomas will try to draw some schemes and I'll clarify some of the questions that are left, then.
Ps. I posted this mail yesterday but only today I found out that devs list moved to xwiki.org. Sorry about the delay.
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Ludovic Dubost Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost AIM: nvludo Yahoo: ludovic
Is findUser being preserved? I didn't see it in the list.. (unless it's replaced by getUser?) On 9/14/07, Ludovic Dubost <[email protected]> wrote:
Hi,
This looks good.. I'm wondering wether the API should be in XWikiGroupService or if we should add a new XWikiUserService api. Concerning retrieving inherited rights we could have this API
Map getInheritedRight(String SpaceOrPage, List rights ("view", "edit", "comment", ..))
It would return a Map of Lists { "view" : { "XWiki.XWikiAllGroup", "XWiki.XWikiGuest" }, "edit": {"XWiki.AdminGrgoup", "XWiki.LudovicDubost" } } If the list is empty at the parent level it will need to go at the upper parent level (until it hits the global level).
Ludovic
Evelyne24 a écrit :
Hello,
In order to implement the Rights Management desired improvements, we concluded that there is need to write an api to help retrieve: - the local / global users - the local / global groups - the inherited rights for users / groups
So after I spoke with Ludovic and Thomas, here is the list of things to be implemented in this api:
XWikiUser ============ We have: -> user (string) -> main (boolean) --> setUser, getUser --> isMain, setMain ---------------------------- We will need to do: --> add methods: * getAllActiveUsers [ will read xwiki settings to know what to return, global or local active users; Thomas and I understood that 'active' user means the user after being registered and confirmed the registration through email maybe, following a link to activate or something like this ] * getAllGlobalUsers * getAllLocalUsers * getAllUsers * getMatchingActiveUsers(string MatchText, XWikiContext) * a method to get details for a user, other than the ones returned by getAllUsers (which will return something like Xwiki.LudovicDubost); we might need firstname, lastname, pagename etc. maybe we can use a parameter for the getAllUsers method, called 'withDetails'(boolean)
XWikiGroupService (interface) ============================= We have --> listGroupsForUser --> addUserToGroup --> listMemberForGroup --> listAllGroups ------------------------- We will need to do: --> add methods: * getAllActiveGroups * getAllGlobalGroups * getAllLocalGroups [ this is currently done by 'listAllGroups' ] * listMatchingActiveGroups(string MatchText, XWikiContext) [ this will help me for the ajax-suggest feature; will return the groups with the name matching a certain string ]
XWikiRightService (interface) ============================== We have: --> checkAccess --> hasAccessLevel --> hasProgrammingRights (2 methods) --> hasAdminRights --> listAllLevels ------------------------------- We will need to do: --> add methods: * to find inherited rights * and maybe other things, I'm not very sure yet
I hope I understood right. Thomas will try to draw some schemes and I'll clarify some of the questions that are left, then.
Ps. I posted this mail yesterday but only today I found out that devs list moved to xwiki.org. Sorry about the delay.
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Ludovic Dubost Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost AIM: nvludo Yahoo: ludovic
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- 'Waste of a good apple' -Samwise Gamgee
Hi, findUser is not par of public Api but XWikiAuthServiceImpl internal tool. Evelina just speak about what needed for velocity/ajax access to new rights system features. 2007/9/14, Erin Schnabel <[email protected]>:
Is findUser being preserved? I didn't see it in the list.. (unless it's replaced by getUser?)
On 9/14/07, Ludovic Dubost <[email protected]> wrote:
Hi,
This looks good.. I'm wondering wether the API should be in XWikiGroupService or if we should add a new XWikiUserService api. Concerning retrieving inherited rights we could have this API
Map getInheritedRight(String SpaceOrPage, List rights ("view", "edit", "comment", ..))
It would return a Map of Lists { "view" : { "XWiki.XWikiAllGroup", "XWiki.XWikiGuest" }, "edit": {"XWiki.AdminGrgoup", "XWiki.LudovicDubost" } } If the list is empty at the parent level it will need to go at the upper parent level (until it hits the global level).
Ludovic
Evelyne24 a écrit :
Hello,
In order to implement the Rights Management desired improvements, we concluded that there is need to write an api to help retrieve: - the local / global users - the local / global groups - the inherited rights for users / groups
So after I spoke with Ludovic and Thomas, here is the list of things to be implemented in this api:
XWikiUser ============ We have: -> user (string) -> main (boolean) --> setUser, getUser --> isMain, setMain ---------------------------- We will need to do: --> add methods: * getAllActiveUsers [ will read xwiki settings to know what to return, global or local active users; Thomas and I understood that 'active' user means the user after being registered and confirmed the registration through email maybe, following a link to activate or something like this ] * getAllGlobalUsers * getAllLocalUsers * getAllUsers * getMatchingActiveUsers(string MatchText, XWikiContext) * a method to get details for a user, other than the ones returned by getAllUsers (which will return something like Xwiki.LudovicDubost); we might need firstname, lastname, pagename etc. maybe we can use a parameter for the getAllUsers method, called 'withDetails'(boolean)
XWikiGroupService (interface) ============================= We have --> listGroupsForUser --> addUserToGroup --> listMemberForGroup --> listAllGroups ------------------------- We will need to do: --> add methods: * getAllActiveGroups * getAllGlobalGroups * getAllLocalGroups [ this is currently done by 'listAllGroups' ] * listMatchingActiveGroups(string MatchText, XWikiContext) [ this will help me for the ajax-suggest feature; will return the groups with the name matching a certain string ]
XWikiRightService (interface) ============================== We have: --> checkAccess --> hasAccessLevel --> hasProgrammingRights (2 methods) --> hasAdminRights --> listAllLevels ------------------------------- We will need to do: --> add methods: * to find inherited rights * and maybe other things, I'm not very sure yet
I hope I understood right. Thomas will try to draw some schemes and I'll clarify some of the questions that are left, then.
Ps. I posted this mail yesterday but only today I found out that devs list moved to xwiki.org. Sorry about the delay.
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Ludovic Dubost Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost AIM: nvludo Yahoo: ludovic
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- 'Waste of a good apple' -Samwise Gamgee _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
Bah.. you're right. We cheated. ;) rather than writing a whole new auth service, we subclassed the XWikiAuthServiceImpl... getAuthenticator, authenticate, checkAuth, checkPassword, findUser... our authenticate does a few things, and then calls the super, which does a lot of stuff and calls findUser/checkPassword. ... On 9/18/07, Thomas Mortagne <[email protected]> wrote:
Hi,
findUser is not par of public Api but XWikiAuthServiceImpl internal tool. Evelina just speak about what needed for velocity/ajax access to new rights system features.
2007/9/14, Erin Schnabel <[email protected]>:
Is findUser being preserved? I didn't see it in the list.. (unless it's replaced by getUser?)
On 9/14/07, Ludovic Dubost <[email protected]> wrote:
Hi,
This looks good.. I'm wondering wether the API should be in XWikiGroupService or if we should add a new XWikiUserService api. Concerning retrieving inherited rights we could have this API
Map getInheritedRight(String SpaceOrPage, List rights ("view", "edit", "comment", ..))
It would return a Map of Lists { "view" : { "XWiki.XWikiAllGroup", "XWiki.XWikiGuest" }, "edit": {"XWiki.AdminGrgoup", "XWiki.LudovicDubost" } } If the list is empty at the parent level it will need to go at the upper parent level (until it hits the global level).
Ludovic
Evelyne24 a écrit :
Hello,
In order to implement the Rights Management desired improvements, we concluded that there is need to write an api to help retrieve: - the local / global users - the local / global groups - the inherited rights for users / groups
So after I spoke with Ludovic and Thomas, here is the list of things to be implemented in this api:
XWikiUser ============ We have: -> user (string) -> main (boolean) --> setUser, getUser --> isMain, setMain ---------------------------- We will need to do: --> add methods: * getAllActiveUsers [ will read xwiki settings to know what to return, global or local active users; Thomas and I understood that 'active' user means the user after being registered and confirmed the registration through email maybe, following a link to activate or something like this ] * getAllGlobalUsers * getAllLocalUsers * getAllUsers * getMatchingActiveUsers(string MatchText, XWikiContext) * a method to get details for a user, other than the ones returned by getAllUsers (which will return something like Xwiki.LudovicDubost); we might need firstname, lastname, pagename etc. maybe we can use a parameter for the getAllUsers method, called 'withDetails'(boolean)
XWikiGroupService (interface) ============================= We have --> listGroupsForUser --> addUserToGroup --> listMemberForGroup --> listAllGroups ------------------------- We will need to do: --> add methods: * getAllActiveGroups * getAllGlobalGroups * getAllLocalGroups [ this is currently done by 'listAllGroups' ] * listMatchingActiveGroups(string MatchText, XWikiContext) [ this will help me for the ajax-suggest feature; will return the groups with the name matching a certain string ]
XWikiRightService (interface) ============================== We have: --> checkAccess --> hasAccessLevel --> hasProgrammingRights (2 methods) --> hasAdminRights --> listAllLevels ------------------------------- We will need to do: --> add methods: * to find inherited rights * and maybe other things, I'm not very sure yet
I hope I understood right. Thomas will try to draw some schemes and I'll clarify some of the questions that are left, then.
Ps. I posted this mail yesterday but only today I found out that devs list moved to xwiki.org. Sorry about the delay.
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Ludovic Dubost Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost AIM: nvludo Yahoo: ludovic
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- 'Waste of a good apple' -Samwise Gamgee _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- 'Waste of a good apple' -Samwise Gamgee
Hi, 2007/9/14, Evelyne24 <[email protected]>:
Hello,
In order to implement the Rights Management desired improvements, we concluded that there is need to write an api to help retrieve: - the local / global users - the local / global groups - the inherited rights for users / groups
So after I spoke with Ludovic and Thomas, here is the list of things to be implemented in this api:
XWikiUser ============ We have: -> user (string) -> main (boolean) --> setUser, getUser --> isMain, setMain ---------------------------- We will need to do: --> add methods: * getAllActiveUsers [ will read xwiki settings to know what to return, global or local active users; Thomas and I understood that 'active' user means the user after being registered and confirmed the registration through email maybe, following a link to activate or something like this ] * getAllGlobalUsers * getAllLocalUsers * getAllUsers * getMatchingActiveUsers(string MatchText, XWikiContext) * a method to get details for a user, other than the ones returned by getAllUsers (which will return something like Xwiki.LudovicDubost); we might need firstname, lastname, pagename etc. maybe we can use a parameter for the getAllUsers method, called 'withDetails'(boolean)
I think It will be better, as Ludovic suggested, to create a XWikiUserService interface for theses methods as it manipulate multi users and XWikiUser represent just one user (and is not an interface).
XWikiGroupService (interface) ============================= We have --> listGroupsForUser --> addUserToGroup --> listMemberForGroup --> listAllGroups ------------------------- We will need to do: --> add methods: * getAllActiveGroups * getAllGlobalGroups * getAllLocalGroups [ this is currently done by 'listAllGroups' ] * listMatchingActiveGroups(string MatchText, XWikiContext) [ this will help me for the ajax-suggest feature; will return the groups with the name matching a certain string ]
XWikiRightService (interface) ============================== We have: --> checkAccess --> hasAccessLevel --> hasProgrammingRights (2 methods) --> hasAdminRights --> listAllLevels ------------------------------- We will need to do: --> add methods: * to find inherited rights * and maybe other things, I'm not very sure yet
I hope I understood right. Thomas will try to draw some schemes and I'll clarify some of the questions that are left, then.
Ps. I posted this mail yesterday but only today I found out that devs list moved to xwiki.org. Sorry about the delay.
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
participants (4)
-
Erin Schnabel -
Evelyne24 -
Ludovic Dubost -
Thomas Mortagne