Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: Access modifiers: msg#00025

cms.opengroupware.xmlrpc.devel

Subject: Re: Access modifiers

On Thu, 2005-04-07 at 09:13 -0400, Adam Tauno Williams wrote:
> > > Does anyone have any notes or code snippets concerning these methods:
> > > access.operationAllowedOnObjectsForAccess
> > > access.setOperationOnObjectForAccess
> > Did you see:
> > http://mail.opengroupware.org/pipermail/xmlrpc/2004-July/000213.html
> > and the original message?
> Yes.
> <quote>
> >> is there any way to set the access rights (Zugriffsrechte) with rpc?
> > Looking at the source code I see implementations of
> > bool access.operationAllowedOnObjectsForAccessAction(op, objects,
> access)
> > bool access.setOperationOnObjectForAccessAction(op, object, access)
> > "op" should be a string like "r" or "rw"
> > "objects" should be an array of strings containing the object-pkeys
> > I think you should pass "None" for "access" (apparently for addressing
> > specific ACL entries)
> </quote>
> > > - which I presume are for modifying the access permissions on an
> > > object?
> It just isn't entirely clear to me.
> One always passes "None" to "access"?
> operationAllowedOnObjectsForAccessAction returns true or false IF the
> operation specified in "op" is permitted in all objects listed in
> object?
> Testing with xmlrpc_call never gets me anything but zero -
> $ xmlrpc_call http://throw/RPC2
> 'access.operationAllowedOnObjectsForAccess' 'w' '619730' 'None'
> login: adam
> password:
> 0
> - would test write access to object 619730 by current user`?
> setOperationOnObjectForAccessAction sets a permission on objects (param
> #2) to the permissions specified in op (param #1)? And param #3 is
> always "None"?

If one passes "None" to access the routine does not seem to work, in
the xml-rpc logs there is a -
Jan 28 15:42:17 ogo-xmlrpcd-1.1 [24134]:
<0x08293964[SkyDocumentManager]> WARNING(-[SkyDocumentManager
_globalIDForStringRelativeToBase:]): cannot convert relative URL to gid:
'None'
Jan 28 15:42:17 ogo-xmlrpcd-1.1 [24134]: [WARN]
<0x0832CB24[SkyAccessManager]> -[OGoAccessManager
operation:allowedOnObjectIDs:forAccessGlobalID:]: missing _accountID

However is one passes the id of an account object then this function
DOES WORK. For instance -
xmlrpc_call http://localhost/RPC2
'access.operationAllowedOnObjectsForAccess' 'r' '18440' '13560'
- checks if account 13560 has "r" permissions on 18440

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'
- in the xml-rpc log even though it still seems to work....
xmlrpc_call http://localhost/RPC2
'access.operationAllowedOnObjectsForAccess' 'rw' '18440' '14540'
0
xmlrpc_call http://localhost/RPC2
'access.operationAllowedOnObjectsForAccess' 'rw' '18440' '10120'
1






--
OpenGroupware.org XML-RPC
xmlrpc@xxxxxxxxxxxxxxxxx
http://mail.opengroupware.org/mailman/listinfo/xmlrpc



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
db.postgresql.b...    video.ffmpeg.us...    gis.qgis.devel/...    web.rdf.redland...    file-systems.oc...    recreation.rail...    systems.archos....    python.c++/2003...    lang.c--/2005-0...    multimedia.gpho...    network.unison....    editors.jedit.u...    hardware.pciids...    cms.tiki.cvs/20...    bug-tracking.ma...    java.hadoop.hba...    ietf.rsvp/2002-...    xfree86.devel/2...    qnx.openqnx.dev...    apache.labs.dev...    tex.pdftex/2008...    os.solaris.open...    user-groups.lin...    kde.koffice/200...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation