[OGo-XML-RPC] Access modifiers

Helge Hess xmlrpc@opengroupware.org
Sat, 28 Jan 2006 18:06:57 +0100


On Jan 28, 2006, at 17:36, Adam Tauno Williams wrote:
>> One always passes "None" to "access"?
...
>> Testing with xmlrpc_call never gets me anything but zero -
>> $ xmlrpc_call http://throw/RPC2
>> 'access.operationAllowedOnObjectsForAccess' 'w' '619730' 'None'

None is a Python "not an object", comparable to a NULL in SQL. In the 
example above you are calling the operation with the string "None", 
which can't work.

> <0x08293964[SkyDocumentManager]> WARNING(-[SkyDocumentManager
> _globalIDForStringRelativeToBase:]): cannot convert relative URL to 
> gid:
> 'None'

See above. On the Obj-C side the None would be converted to NSNull or 
nil, here it gets a string "None" and tries to treat it as a primary 
key.

> However is one passes the id of an account object then this function
> DOES WORK.

Yes, I think None is just a shortcut for "current login account", which 
I think is the only access-id guaranteed to work.

> For instance -
> xmlrpc_call http://localhost/RPC2
> 'access.operationAllowedOnObjectsForAccess' 'r' '18440' '13560'
> - checks if account 13560 has "r" permissions on 18440

Si.

> For op you can pass "r", "w", or "rw",  although if you pass an "rw" 
> you
> get -
> Jan 28 15:48:35 ogo-xmlrpcd-1.1 [27767]: [WARN]
> <0x08341994[OGoCompanyAccessHandler]> operation should be a single 
> char,
> got: 'rw'

Hm. AFAIK it should work with permission sets like 'rw', not sure why 
the message is logged.

Greets,
   Helge
-- 
http://docs.opengroupware.org/Members/helge/
OpenGroupware.org