On Mar 31, 2004, at 6:50 PM, Lists wrote:
I'm trying to figure out how to set the access rights for a project. I
didn't find any docs about "project.getAccounts" and
"project.addAccount".
I don't know what kind of arguments I should pass to
"project.getAccounts" and "project.addAccount".
How do I setup access rights?
Documentation would be better, but in general it helps to look into the
XmlRpcAPI/Daemon/Actions.subproj sources, it should give some hints on
what is expected.
OK, lets take a look, DirectAction+Project.m:
---snip---
- (id)project_addAccountAction:(NSString *)_projectID
:(NSString *)_login
:(NSString *)_rights
---snap---
So it expects the project code as the first argument, the login of the
account being added as the second and the permission flags as the third
(I think in a form like "rwdi").
It returns a boolean (yes or no).
---snip---
- (id)project_getAccountsAction:(id)_projectID {
---snap---
Well, also takes the projectID as the first argument and probably
returns the account documents encoded as dictionaries.
Note that the projectID is not the primary key of the project (the
projectId field) but the (string) "project code" or "project number"
(whatever this is called in XML-RPC encoding).
regards,
Helge
--
http://docs.opengroupware.org/Members/helge/
OpenGroupware.org
--
OpenGroupware.org XML-RPC
xmlrpc@xxxxxxxxxxxxxxxxx
http://mail.opengroupware.org/mailman/listinfo/xmlrpc
|