"give away" object

Author Message

paul bolger

Thursday 14 April 2011 6:47:40 pm

I'm building a site where logged in users can create and edit some objects, events and a custom organisation class. I would like to provide a method for the owners of an object to be able to give away, transfer ownership, an object to another registered user without having to ask an administrator to step in. Can anyone suggest how I would do this?

Paul Bolger

Ivo Lukac

Friday 15 April 2011 12:25:29 am

Try this one: http://projects.ez.no/change_owner

Would need some adjustments...

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Marko Žmak

Saturday 16 April 2011 5:27:03 am

P.S. You should be very carefull about giving users the ability to change ownership of and object. If you don't set the permissions or restrictions right it might happen than a user takes ownership of the entire site. Or even take ownership of the admin user and then change it's password.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

paul bolger

Sunday 17 April 2011 1:24:26 pm

"

Try this one: http://projects.ez.no/change_owner

Would need some adjustments.

"

Thanks Ivo, although I discovered that the readme is a bit, er, wrong. To construct a browse link you need to use

/owner/change/<node id> rather than /owner/browse/<node id.

Unfortunately it's not a great deal of use though, as it doesn't allow role setting beyond 'allow full access'. In my case I need 'allow only on self-owned objects' and, as Žmak points out, I'd be certifiable to allow this to users with no restrictions.

So, it's a great little extension (come back Xavier, we miss you!), but would be a killer with a bit of improvement. Any takers?

/owner/browse/

Paul Bolger

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 04:27:42
Script start
Timing: Jan 18 2025 04:27:42
Module start 'layout'
Timing: Jan 18 2025 04:27:42
Module start 'content'
Timing: Jan 18 2025 04:27:43
Module end 'content'
Timing: Jan 18 2025 04:27:43
Script end

Main resources:

Total runtime0.8380 sec
Peak memory usage4,096.0000 KB
Database Queries64

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0075 588.9141152.6094
Module start 'layout' 0.00750.0031 741.523439.4219
Module start 'content' 0.01060.8263 780.9453604.8750
Module end 'content' 0.83690.0010 1,385.820312.1875
Script end 0.8379  1,398.0078 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.4525160.0002
Check MTime0.00160.1962160.0001
Mysql Total
Database connection0.00080.094610.0008
Mysqli_queries0.781493.2528640.0122
Looping result0.00070.0811620.0000
Template Total0.807796.420.4038
Template load0.00300.358520.0015
Template processing0.804796.024520.4023
Template load and register function0.00010.010410.0001
states
state_id_array0.00080.098610.0008
state_identifier_array0.00070.083920.0004
Override
Cache load0.00260.3084250.0001
Sytem overhead
Fetch class attribute can translate value0.00070.084030.0002
Fetch class attribute name0.00120.145670.0002
XML
Image XML parsing0.00140.172430.0005
class_abstraction
Instantiating content class attribute0.00000.001580.0000
General
dbfile0.00090.1022310.0000
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 8

Time used to render debug report: 0.0001 secs