End User Database Management So, this is my first question on Stack Exchange! So, I'm currently working on a project in which users of my Drupal site are playing a game as art collectors, and have a collection of artworks, which they can trade and sell during the game. Since my users will need to be able to reassign ownership of works (which would be stored in a database, as each work has several fields attached to it (artist, date, value, material, size, etc.) 

And while I want them to be able to change ownership, it'd be preferable if I could let them do this in some kind of GUI, where I could limit control of what fields they could edit. In an idyllic scenario, they would have a drop-down menu they could select from to choose the new owner of the work, but I'm not sure how realistic that is. 

Any modules that could assist in this would be fantastic, or if you have a different approach (other than a database), I'm more than happy to hear. This Drupal site is currently running on Ubuntu 16.04 LTS with the latest Drupal 7.5 installed. 

I hope I was concise enough in my first question, and that somebody can help!
In a nutshell, you could do this with a user reference field, but you would be exposing everyone in the system (assuming all of these people are Drupal users). Maybe that isn't a big deal, maybe it is. I would create a view reference for the user reference field to only show users who are of a given role only, which should limit results. Furthermore, they would have to know the Drupal username - but you can get around that by installing RealName which swaps usernames for a realname field.

A reason for tying nodes to user accounts would be built-in permissions. "Owner" as just a Drupal textfield wouldn't really cut it in terms of true ownership.

I have done this in the past, similar scenario, different circumstance, where the system would create listings for businesses in the local area, and the business owners would come, register, and 'claim ownership' of their listing node by contacting us (webform). After vetting, we would change the node author (owner) from the admin to their Drupal account. Since they could have multiple, their user account dashboard listed all nodes that belong to them, free to edit and update. 

I would also advise using a revision workflow so admins can track the history of a node and revert mistakes (as they are bound to happen from time to time).

Note, I am assuming your game pieces are custom entities or content types. It will work in either case.

You would need to give users enough permission to 'edit own ____' entity, and be able to update the user reference field. On submit, you could fire a custom rule with Rules that looks at the user reference field value, and updates the entity owner to that value (uid). Alternatively, you could implement a custom submit handler via hook_form_alter on specific forms, and do the logic yourself. The referenced UID value gets set as the owner, and once that happens, that user will no longer have access to edit or anything.

See:


https://www.drupal.org/project/realname
https://www.drupal.org/project/rules