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

Define TENANT_APPS b/c impossible to check for errors otherwise #1535

Merged
merged 1 commit into from
Apr 11, 2020

Conversation

atodorov
Copy link
Member

this is a setting which is relevant only for
kiwitcms-tenants/django-tenants and for Kiwi TCMS represents a
subset of all applications accessible to each tenant. These are
the appilications which hold private data for that tenant.

In the past we've had issues where adding a new app into
INSTALLED_APPS (e.g. tcms.bugs) didn't make it into TENANT_APPS
and resulted in all users being able to share bugs which we didn't
want.

Because TENANT_APPS is always a subset of INSTALLED_APPS it is not
possible to check if we've added something to INSTALLED_APPS but
forgot to add it into TENANT_APPS. That's why I'm moving this
setting here and using it as a temporary variable to construct the
full list of INSTALLED_APPS.

this is a setting which is relevant only for
kiwitcms-tenants/django-tenants and for Kiwi TCMS represents a
subset of all applications accessible to each tenant. These are
the appilications which hold private data for that tenant.

In the past we've had issues where adding a new app into
INSTALLED_APPS (e.g. tcms.bugs) didn't make it into TENANT_APPS
and resulted in all users being able to share bugs which we didn't
want.

Because TENANT_APPS is always a subset of INSTALLED_APPS it is not
possible to check if we've added something to INSTALLED_APPS but
forgot to add it into TENANT_APPS. That's why I'm moving this
setting here and using it as a temporary variable to construct the
full list of INSTALLED_APPS.
@codecov
Copy link

codecov bot commented Apr 10, 2020

Codecov Report

Merging #1535 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1535   +/-   ##
=======================================
  Coverage   75.32%   75.33%           
=======================================
  Files         122      122           
  Lines        4637     4638    +1     
  Branches      569      569           
=======================================
+ Hits         3493     3494    +1     
  Misses        946      946           
  Partials      198      198           
Impacted Files Coverage Δ
tcms/settings/common.py 96.87% <100.00%> (+0.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a39d079...8de88d9. Read the comment docs.

@atodorov atodorov merged commit 3a17cd9 into master Apr 11, 2020
@atodorov atodorov deleted the next_release branch April 11, 2020 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant