glasgowcompbio / GraphOmics

Interactive multi-omics data explorer to integrate and interactively explore transcripts, proteins and metabolites data.

Home Page:https://graphomics.glasgowcompbio.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Public experiment / access control

joewandy opened this issue · comments

Right now anybody could access any experiment (in read only mode) by just typing the URL to the analysis.
We should add a flag to prevent this, unless the experiment is made public by the user.

For access control:

  1. Database change
  2. Add decorator to views

Done in commit f72cd72 and d1fbbad.

  • Added a database flag public in the Analysis model. If public is True, then the analysis can be accessed directly through the URL (the default value is False).
  • Added a screen in the Settings to toggle an analysis to be public or private
  • Added the following checks in views. Not a decorator but this will do for now.
    • If user has not logged in, then they can only view public analyses
    • If user has logged in, then they can only view analyses that they created or are shared with.