-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Complete rewrite with a focus on security
The old design was based on a lot of untested behavior that has since been included in Django itself, including proper testing and security oversight. This refactoring uses those new tools and aims to greatly simplify the overall design. This simplification should keep potential exposior to a minimum. As a result almost all settings have been dropped, infavor of a simple permission callback and a notification template. Both can be overriden in a users application to customize behavior as need. The documenation is completly rewritten too. It may server as a good starting point to understand this change. Changes in a nutshell: * Add Material style snackback notification * Use permission callbacks instead of settings * Provide permission callback for convenience * Render and inject notification via middleware * Use Django class based views and mixins for permission handling * Update the documentation to reflect new design * Compile gettext messages during release * Switch to SCSS and compile during release * Add msgcheck linter for translations * Add styleling as a SCSS linter * Update translations Co-Authored-By: Pavel Torbeev <p.torbeev@gmail.com>
- Loading branch information
Showing
91 changed files
with
6,113 additions
and
1,954 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package-lock.json binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
open-pull-requests-limit: 100 | ||
- package-ecosystem: pip | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
- package-ecosystem: npm | ||
directory: "/" | ||
schedule: | ||
interval: monthly | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": "stylelint-config-standard", | ||
"plugins": [ | ||
"stylelint-scss" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
prune .github | ||
exclude .gitignore | ||
exclude requirements.txt | ||
include hijack/locale/*/LC_MESSAGES/django.mo hijack/static/hijack/hijack.min.css | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
MSGLANGS = $(wildcard hijack/locale/*/LC_MESSAGES/*.po) | ||
MSGOBJS = $(MSGLANGS:.po=.mo) | ||
|
||
.PHONY: gettext gettext-clean msgcheck translations static dist clean | ||
|
||
translations: | ||
(cd hijack && django-admin makemessages --all --no-obsolete) | ||
|
||
gettext: $(MSGOBJS) | ||
|
||
gettext-clean: | ||
-rm $(MSGOBJS) | ||
|
||
%.mo: %.po | ||
msgfmt --check-format --check-domain --statistics -o $@ $*.po | ||
|
||
msgcheck: | ||
msgcheck -n $(MSGLANGS) | ||
|
||
static: | ||
npm ci | ||
npm run build | ||
|
||
dist: static gettext | ||
python -m pip install --upgrade pip setuptools wheel twine | ||
python setup.py sdist bdist_wheel | ||
|
||
clean: gettext-clean | ||
-rm -rf dist build .eggs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docs/security.md |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.