Skip to content

Commit b7e29cc

Browse files
devGregAclaude
authored andcommitted
Tailwind UI rebuild, legacy authorization, OS surface removals
Hand the authorization layer off to dojo-pro. OS keeps a legacy ``is_superuser`` / ``is_staff`` / ``authorized_users`` model and the seven RBAC + Dojo_Group classes survive as ``managed=False`` shells in ``dojo/authorization/models.py`` so historical pro migrations (``pro.0001_plugiun_consolidation`` ``EnhancedDojoGroup.group``, ``pro.0034_pghistory_for_permissions_models`` proxy bases) keep resolving when Django reloads project state. OS code makes no runtime references to Pro. Single ``dojo.0268_release_authorization_to_pro`` migration folds: - Re-introduces ``authorized_users`` M2M on Product / Product_Type and backfills it from the RBAC tables (Member / Group → flat membership; Global_Role(Owner|Writer|Maintainer|API_Importer) → ``is_superuser`` / ``is_staff``). - Drops the redundant post-RBAC ``members`` / ``authorization_groups`` M2M accessors on Product / Product_Type (the through-tables remain). - Flips the eight authorization shells to ``managed=False`` and pins their ``db_table``s. - ``RemoveField``s ``default_group`` / ``default_group_role`` / ``default_group_email_pattern`` from ``dojo_system_settings`` (Pro copies the values onto ``EnhancedSystemSettings`` first via ``run_before``). Plus the Tailwind UI rebuild and the OS surface tidying that this branch was already carrying. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 558a3d2 commit b7e29cc

678 files changed

Lines changed: 48710 additions & 17304 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Dockerfile.nginx-alpine

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ RUN \
6161
yarn
6262
COPY manage.py ./
6363
COPY dojo/ ./dojo/
64+
# Build Tailwind CSS
65+
RUN cd components && yarn build:css
6466
# always collect static for debug toolbar as we can't make it dependant on env variables or build arguments without breaking docker layer caching
6567
RUN env DD_SECRET_KEY='.' DD_DJANGO_DEBUG_TOOLBAR_ENABLED=True python3 manage.py collectstatic --noinput --verbosity=2 && true
6668

components/node_modules/.gitkeep

Whitespace-only changes.

components/package.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
{
22
"name": "defectdojo",
33
"version": "2.59.0-dev",
4-
"license" : "BSD-3-Clause",
4+
"license": "BSD-3-Clause",
55
"private": true,
66
"dependencies": {
7+
"@fontsource-variable/work-sans": "^5.1",
78
"JUMFlot": "jumjum123/JUMFlot#*",
9+
"alpinejs": "^3.14",
810
"bootstrap": "^3.4.1",
911
"bootstrap-select": "^1.13.18",
1012
"bootstrap-social": "^4.0.0",
1113
"bootstrap-wysiwyg": "^2.0.0",
14+
"chart.js": "^4.4",
15+
"chartjs-adapter-moment": "^1.0",
1216
"chosen-bootstrap": "https://github.com/dbtek/chosen-bootstrap",
1317
"chosen-js": "^1.8.7",
1418
"clipboard": "^2.0.11",
@@ -18,10 +22,12 @@
1822
"drmonty-datatables-plugins": "^1.0.0",
1923
"drmonty-datatables-responsive": "^1.0.0",
2024
"easymde": "^2.21.0",
25+
"flatpickr": "^4.6",
2126
"flot": "flot/flot#~0.8.3",
2227
"font-awesome": "^4.0.0",
2328
"fullcalendar": "^3.10.2",
2429
"google-code-prettify": "^1.0.0",
30+
"htmx.org": "^2.0",
2531
"jquery": "^3.7.1",
2632
"jquery-highlight": "3.5.0",
2733
"jquery-ui": "1.14.2",
@@ -36,6 +42,16 @@
3642
"pdfmake": "^0.3.7",
3743
"startbootstrap-sb-admin-2": "1.0.7"
3844
},
45+
"devDependencies": {
46+
"@tailwindcss/cli": "^4.1",
47+
"@tailwindcss/forms": "^0.5",
48+
"tailwindcss": "^4.1"
49+
},
50+
"scripts": {
51+
"copy:fonts": "mkdir -p ../dojo/static/dojo/css/files && cp node_modules/@fontsource-variable/work-sans/files/work-sans-*-wght-normal.woff2 ../dojo/static/dojo/css/files/",
52+
"build:css": "npm run copy:fonts && npx @tailwindcss/cli -i tailwind.css -o ../dojo/static/dojo/css/tailwind-out.css --minify",
53+
"watch:css": "npm run copy:fonts && npx @tailwindcss/cli -i tailwind.css -o ../dojo/static/dojo/css/tailwind-out.css --watch"
54+
},
3955
"engines": {
4056
"yarn": ">= 1.0.0"
4157
}

0 commit comments

Comments
 (0)