Chado icon indicating copy to clipboard operation
Chado copied to clipboard

associating contact roles with a project?

Open bradfordcondon opened this issue 6 years ago • 7 comments

Hello,

I'm mapping out a module that would integrate drupal users with chado contacts. Part of that is I would like to assign users to different roles for different subsets of chado data. The most obvious way to do that to me is to use the chado.project_contact table. However that table only has contact_id and project_id: how can i specify that user X is the admin for a project and user Y has read access, and user Z has write access?

I would think either a) type_id for project_contact or b) project_contactprop. Either approach would involve adding to Chado. there's always c) do it my own way and/or not in Chado. i can see how this isnt strictly biological data and therefore i should have, instead, a public linker table for users and projects where i can specify the role as its own column.

Any thoughts/experience on this?

bradfordcondon avatar Oct 05 '18 17:10 bradfordcondon

I lean towards A. I also would benefit from this addition since it would be nice to indicate the primary contact for a project as well as the PI (if different).

laceysanderson avatar Oct 05 '18 19:10 laceysanderson

hmmm but what if you decide you want to adopt my user-content management stuff? Now we have two types we want associated: PI (the metadata) and Administrator (the site role).

bradfordcondon avatar Oct 05 '18 19:10 bradfordcondon

Good point, maybe a b) is better so the type would be "Access control" or "Role" and the cvalue_id would point to "PI" or "Administrator"

laceysanderson avatar Oct 05 '18 19:10 laceysanderson

I think b) would be better as well since one person may have multiple roles on a project.

ekcannon avatar Oct 08 '18 16:10 ekcannon

Could you use the wwwuser module of Chado for this?

http://gmod.org/wiki/Chado_WWW_Module

spficklin avatar Oct 11 '18 19:10 spficklin

thank you so much for bringing this up @spficklin is there any more documentation than this anywhere? what is world_read thats in each table?

bradfordcondon avatar Oct 11 '18 19:10 bradfordcondon

looking at it a bit more: no prop table/type_id so cant denote one user is an admin and another has write. Unless thats the purpose of the world_read column?

bradfordcondon avatar Oct 11 '18 19:10 bradfordcondon