{"action":"created","issue":{"url":"https://api.github.com/repos/IQSS/dataverse/issues/1151","labels_url":"https://api.github.com/repos/IQSS/dataverse/issues/1151/labels{/name}","comments_url":"https://api.github.com/repos/IQSS/dataverse/issues/1151/comments","events_url":"https://api.github.com/repos/IQSS/dataverse/issues/1151/events","html_url":"https://github.com/IQSS/dataverse/issues/1151","id":49574177,"number":1151,"title":"Stop using @pete and @uma (strings) in role assignments rather than @2 and @3 (database IDs)","user":{"login":"pdurbin","id":21006,"avatar_url":"https://avatars.githubusercontent.com/u/21006?v=3","gravatar_id":"","url":"https://api.github.com/users/pdurbin","html_url":"https://github.com/pdurbin","followers_url":"https://api.github.com/users/pdurbin/followers","following_url":"https://api.github.com/users/pdurbin/following{/other_user}","gists_url":"https://api.github.com/users/pdurbin/gists{/gist_id}","starred_url":"https://api.github.com/users/pdurbin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdurbin/subscriptions","organizations_url":"https://api.github.com/users/pdurbin/orgs","repos_url":"https://api.github.com/users/pdurbin/repos","events_url":"https://api.github.com/users/pdurbin/events{/privacy}","received_events_url":"https://api.github.com/users/pdurbin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/IQSS/dataverse/labels/Component%3A+High-level","name":"Component: High-level","color":"c7def8"},{"url":"https://api.github.com/repos/IQSS/dataverse/labels/Status%3A+Design","name":"Status: Design","color":"66ff66"},{"url":"https://api.github.com/repos/IQSS/dataverse/labels/Type%3A+Suggestion","name":"Type: Suggestion","color":"fef2c0"}],"state":"open","locked":false,"assignee":{"login":"scolapasta","id":4268292,"avatar_url":"https://avatars.githubusercontent.com/u/4268292?v=3","gravatar_id":"","url":"https://api.github.com/users/scolapasta","html_url":"https://github.com/scolapasta","followers_url":"https://api.github.com/users/scolapasta/followers","following_url":"https://api.github.com/users/scolapasta/following{/other_user}","gists_url":"https://api.github.com/users/scolapasta/gists{/gist_id}","starred_url":"https://api.github.com/users/scolapasta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scolapasta/subscriptions","organizations_url":"https://api.github.com/users/scolapasta/orgs","repos_url":"https://api.github.com/users/scolapasta/repos","events_url":"https://api.github.com/users/scolapasta/events{/privacy}","received_events_url":"https://api.github.com/users/scolapasta/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/IQSS/dataverse/milestones/11","labels_url":"https://api.github.com/repos/IQSS/dataverse/milestones/11/labels","id":720835,"number":11,"title":"Dataverse 4.0: Final","description":"- Complete data and account migration\r\n- Final integration with TwoRavens and Zelig 5\r\n- Read only mode\r\n- Documentation\r\n- UI clean up\r\n- APIs finished\r\n- Code and testing completed","creator":{"login":"scolapasta","id":4268292,"avatar_url":"https://avatars.githubusercontent.com/u/4268292?v=3","gravatar_id":"","url":"https://api.github.com/users/scolapasta","html_url":"https://github.com/scolapasta","followers_url":"https://api.github.com/users/scolapasta/followers","following_url":"https://api.github.com/users/scolapasta/following{/other_user}","gists_url":"https://api.github.com/users/scolapasta/gists{/gist_id}","starred_url":"https://api.github.com/users/scolapasta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scolapasta/subscriptions","organizations_url":"https://api.github.com/users/scolapasta/orgs","repos_url":"https://api.github.com/users/scolapasta/repos","events_url":"https://api.github.com/users/scolapasta/events{/privacy}","received_events_url":"https://api.github.com/users/scolapasta/received_events","type":"User","site_admin":false},"open_issues":64,"closed_issues":3,"state":"open","created_at":"2014-07-14T20:18:22Z","updated_at":"2015-01-12T21:43:12Z","due_on":"2015-02-02T05:00:00Z","closed_at":null},"comments":4,"created_at":"2014-11-20T16:09:35Z","updated_at":"2015-01-13T13:10:50Z","closed_at":null,"body":"The more I stare at the role assignment table (screenshot attached) the more I'm completely freaked out by the use of strings in role assignments rather than id numbers.\r\n\r\nWhen I assign a role to Pete it gets persisted as \"@pete\" rather than \"@2\".\r\n\r\nI'm fine with the use of @ for users and some other symbol (&) for groups.\r\n\r\nBut what if pete wants to change his username?\r\n\r\nWhy should I have to do extra database lookups to figure out the database id of the authenticated user? Why can't I just have the authenticated user's database id right there in front of me while I'm looking at the role assignment table?\r\n\r\nHere are some more examples with `@admin`, `@finch`, and `@spruce`:\r\n\r\n![brittle](https://cloud.githubusercontent.com/assets/21006/5127931/7fefcdb2-70a5-11e4-9f28-f26f146b45e8.png)\r\n"},"comment":{"url":"https://api.github.com/repos/IQSS/dataverse/issues/comments/69741619","html_url":"https://github.com/IQSS/dataverse/issues/1151#issuecomment-69741619","issue_url":"https://api.github.com/repos/IQSS/dataverse/issues/1151","id":69741619,"user":{"login":"pdurbin","id":21006,"avatar_url":"https://avatars.githubusercontent.com/u/21006?v=3","gravatar_id":"","url":"https://api.github.com/users/pdurbin","html_url":"https://github.com/pdurbin","followers_url":"https://api.github.com/users/pdurbin/followers","following_url":"https://api.github.com/users/pdurbin/following{/other_user}","gists_url":"https://api.github.com/users/pdurbin/gists{/gist_id}","starred_url":"https://api.github.com/users/pdurbin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdurbin/subscriptions","organizations_url":"https://api.github.com/users/pdurbin/orgs","repos_url":"https://api.github.com/users/pdurbin/repos","events_url":"https://api.github.com/users/pdurbin/events{/privacy}","received_events_url":"https://api.github.com/users/pdurbin/received_events","type":"User","site_admin":false},"created_at":"2015-01-13T13:10:50Z","updated_at":"2015-01-13T13:10:50Z","body":"In discussing this issue we really, really need to stop conflating userIdentifier with username. They are very different things. It only confuses things.\r\n\r\n**A username is a string that's probably no more than a dozen characters long that you can imagine telling someone over the phone.** (\"On Twitter, I'm 'philipdurbin' but on GitHub I'm 'pdurbin'.\") **Every authenticated user should have a username**, I've argued for a long time. Both Twitter and GitHub allow you to change your username and in fact on Twitter the Dataverse account was recently changed from \"thedataorg\" to \"dataverseorg\" in https://github.com/IQSS/dataverse.org/issues/32\r\n\r\nAs of this writing, only builtin users have usernames. This is unfortunate.\r\n\r\nCurrently, what all authenticated users have (both builtin and shib) is a **userIdentifier, a potentially long, ugly, unfriendly, unreadable string**.  The userIdentifier for Shibboleth users looks something like `@https://idp.testshib.org/idp/shibboleth|2c9c47ca-dfc9-41f7-a04d-e47e42b7871c@testshib.org`. I had opened #1123 because at one point we were exposing these nasty things in the UI.\r\n\r\nI don't necessarily want to store a role assignment for pete as the string `@2`. A foreign key would be better, if we can figure out how to do this and still account for groups."}}