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

Control read only mode with environmental variable #11710

Closed
giohappy opened this issue Nov 20, 2023 · 0 comments · Fixed by #11711
Closed

Control read only mode with environmental variable #11710

giohappy opened this issue Nov 20, 2023 · 0 comments · Fixed by #11711
Assignees

Comments

@giohappy
Copy link
Contributor

At the moment GeoNode can be put in read-only mode through the Configuration.read_only DB variable.

A new boolean FORCE_READ_ONLY_MODE setting will be implemented to be able to force the read-only mode from settings.
The variable will override any configuration set from DB.

A quick solution can be to do it within the Configuration.load() method, which will need to override the inherited SingletonModel.load() method.
The value obtained from FORCE_READ_ONLY_MODE will override the value stored inside the returned obj.

@mattiagiupponi mattiagiupponi linked a pull request Nov 21, 2023 that will close this issue
12 tasks
giohappy pushed a commit that referenced this issue Nov 21, 2023
* Add env-var to override the readonly mode

* Fix flake8 issue

* Add test coverage

* Add test coverage

* Add test coverage

* Fix broken test
github-actions bot pushed a commit that referenced this issue Nov 21, 2023
* Add env-var to override the readonly mode

* Fix flake8 issue

* Add test coverage

* Add test coverage

* Add test coverage

* Fix broken test

(cherry picked from commit a655d8d)
mattiagiupponi added a commit that referenced this issue Nov 21, 2023
…11712)

* Add env-var to override the readonly mode

* Fix flake8 issue

* Add test coverage

* Add test coverage

* Add test coverage

* Fix broken test

(cherry picked from commit a655d8d)

Co-authored-by: mattiagiupponi <51856725+mattiagiupponi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants