sciencehistory / chf-sufia

sufia-based hydra app
Other
9 stars 4 forks source link

Create user group whose files / objects default to "private" visibility #2

Closed hackartisan closed 7 years ago

hackartisan commented 9 years ago

Only admins can publish

hackartisan commented 9 years ago

Some code to consult:

hackartisan commented 9 years ago

for reference https://github.com/osulp/Scholars-Archive/blob/master/app/models/ability.rb#L6-L11

hackartisan commented 9 years ago

notes from conversation i just had with nrogers about role maps:

hackartisan commented 9 years ago

more irc conversation: 15:10 HackmasterA: anyone have a rake task lying around that creates an initial admin user? 15:14 dmc186 has left IRC (Ping timeout: 248 seconds) 15:15 dmc186 has joined (~Adium@71.58.78.107) 15:26 ruebot has left IRC (Quit: Please, sir, I want some more.) 15:26 atz: HackmasterA: you mean at the system level? 15:26 atz: or DB? 15:26 HackmasterA: atz: DB (app level) 15:31 atz: HackmasterA: isn't that implied in a normal db:migrate? 15:32 HackmasterA: atz: is it? I will look 15:32 mejackreed has left IRC (Quit: Leaving.) 15:33 nrogers_art: HackmasterA: Are you using the defacto role map or did you switch it out for something else? 15:34 HackmasterA: nrogers_art: I had set up an admin role using Ability but I didn't do anything with it and may have caused problems so I'm temporarily rolling back to nothing. 15:34 HackmasterA: i've never touched the role map. 15:35 nrogers_art: I just set up a new group in the role map and then changed ability without too many issues 15:35 HackmasterA: nrogers_art: you have to do both? maybe that's what's causing my problem. 15:36 jpstroop has left () 15:36 nrogers_art: I don't actually have an example of the Role Map in version control but I just added an admin: group

and via /msg:

hackartisan commented 8 years ago

Role mapper is the default way to do this in sufia, but you have to keep a config file of your users. https://github.com/projecthydra/hydra-role-management is the way I started doing it before, and I like that technique better.