Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussion around permissions #94

Closed
joncison opened this issue Sep 2, 2020 · 8 comments
Closed

Discussion around permissions #94

joncison opened this issue Sep 2, 2020 · 8 comments
Labels
help wanted Extra attention is needed med priority A medium-priority issue.

Comments

@joncison
Copy link
Collaborator

joncison commented Sep 2, 2020

Original issues was "No permissions class set on ServiceViewSet"

@joncison
Copy link
Collaborator Author

joncison commented Sep 2, 2020

Good to check systematically for all models.

@bryan-brancotte
Copy link
Member

Do we want or not want permissions ?

@joncison
Copy link
Collaborator Author

joncison commented Sep 3, 2020

I'll paste the current permissions for the different models in a comment below, so that @hmenager can take a look and confirm he's happy with them.

@joncison
Copy link
Collaborator Author

joncison commented Sep 3, 2020

This is the current state, some changes are needed I think:

PubliclyReadableEditableByOwner
Everyone can see, authenticated users can create, but only owner can update/delete.

  • UserProfile
  • NewsItem
  • Event
  • TrainingEvent
  • Trainer
  • TrainingEventMetrics
  • EventSponsor
  • Organisation,
  • Project
  • ComputingFacility
  • TrainingMaterial
  • Team
  • BioinformaticsTeam
  • Service
  • ServiceSubmission

PubliclyReadableEditableByCoordinator
Currently just IsAuthenticatedOrReadOnly, owner_field is set to "coordinator", but no permissions logic is defined (coding needed!)

  • ElixirPlatform

PubliclyReadableByUsers
Everyone can see, but no one (other than superuser) can update/delete.

  • Keyword
  • EventPrerequisite
  • Community

@joncison
Copy link
Collaborator Author

joncison commented Sep 3, 2020

Good to have a discussion about this tomorrow cc @bryan-brancotte @hmenager.

Some thoughts:

Beyond that, it could be really nice if, somehow (user groups?), specific people or persons could also have edit permissions set automatically:

  • Event, TrainingEvent: person identified by contactId field
  • TrainingEvent: people identified by trainerId field of TrainingEvent->Trainer object(s)
  • Project: people identified by members field of Project->Team object
  • ComputingFacility: people identified by members field of ComputingFacility->Team object
  • Service: people identified by members field of Service->BioinformaticsTeam object
  • Team, BioinformaticsTeam: people identified by members field of (Bioinformatics)Team object
  • ServiceSubmission people identified by authors and submitters fields

@joncison joncison added help wanted Extra attention is needed med priority A medium-priority issue. labels Sep 3, 2020
@joncison joncison changed the title No permissions class set on ServiceViewSet Discussion around permissions Sep 4, 2020
bryan-brancotte added a commit that referenced this issue Sep 7, 2020
@bryan-brancotte
Copy link
Member

I created and used permissions as needed here before. I did not adresse any question raised by "Some thoughts:"

TrainingEventMetricsViewSet is PubliclyReadable, is it ok ? Should'nt it be kept private ?

@joncison
Copy link
Collaborator Author

joncison commented Sep 7, 2020

Yup - TrainingEventMetricsViewSet should def. be private!

@bryan-brancotte
Copy link
Member

subsumed by #155

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed med priority A medium-priority issue.
Projects
None yet
Development

No branches or pull requests

2 participants