Commit Graph

135 Commits

Author SHA1 Message Date
bfe80db85e Misc fixes 2020-08-30 10:48:19 +01:00
9198724748 Medium event power stuff done, barring worst case stuff 2020-08-29 23:56:08 +01:00
dbe0d35400 Event checklist crew works
Mostly - its not happy with timezones
2020-08-29 22:01:23 +01:00
1feb9449ed Cleanup 2020-08-29 17:31:41 +01:00
d708207ab9 Versioning module now does magic
Automatic creation of views/urls for anything registered with reversion, with a small amount of hackage to preserve legacy stuff. (and the DAMNED asset IDs!) I would never get distracted...
2020-08-29 16:24:11 +01:00
8ea96674db Initial work on new checklist handling. No more JSON! 2020-08-29 13:56:57 +01:00
828964ecb6 Alter rig_count to not include un-checked-in dry hires 2020-08-27 17:08:51 +01:00
3438489934 Add new line functionality for vehicles/drivers
Might it have been easier to create 'dummy' models like with EventItems? Probably...
2020-08-27 02:20:46 +01:00
8bb08724b6 Initial shenanigans on storing my overly fancy EC form 2020-08-24 17:25:25 +01:00
d3f55523da Start work on event checklist 2020-08-14 17:30:57 +01:00
92377227e0 Start RA 'mark review' feature 2020-08-05 20:51:31 +01:00
2e60c5e7bf Do not use Django 'required' for radio selects
As this requires them to be True, whereas we just need to require that an option be entered.
2020-07-03 17:09:32 +01:00
d800a781a5 Fixes to revisions for RAs 2020-07-02 20:13:24 +01:00
721439d095 More RA fixes 2020-07-02 19:26:27 +01:00
b57b918247 Remove the defaults from the RA fields + make them required 2020-07-02 19:20:20 +01:00
3768f4a613 Start RA list template 2020-05-30 17:19:11 +01:00
e45324f5b4 Refactor activity feed template logic
Yay for removing arbitrary if/else chains!
2020-05-30 14:07:50 +01:00
156e639bac Initial work at coercing activity feed into showing RAs
Also shows Asset/Supplier on the homepage feed.
2020-05-29 15:45:16 +01:00
d3b3d1c9d7 Move text definitions to somewhere more authoratitive 2020-05-28 23:02:47 +01:00
4cfd83eeb3 Different approach to RA linking 2020-05-28 21:46:39 +01:00
b75b6a6736 Initial work at integrating the risk assessment
#136. No clever database structure as yet...
2020-05-28 18:55:22 +01:00
2f7389d8bb Really ought to get a pre-commit hook for pep8... 2020-05-25 13:40:53 +01:00
e6d06db2a1 FIX: Prevent setting access time after start time
Cherry pick of d274ea4606. Will close #405.
2020-05-25 01:16:26 +01:00
5e60675115 Python Format/import opt 2020-04-12 20:10:35 +01:00
f308a095f3 Breakout (most) user stuff to separate module
The model remains in RIGS for now, as it's pretty painful to move...
2020-04-12 19:22:03 +01:00
50ca782569 Start reworking invoice things 2020-03-18 18:38:37 +00:00
f4f8c6b417 Delete obsolete code 2020-03-18 00:30:23 +00:00
8568c591a9 Update Python Dependencies (#404)
* [requires.io] dependency update

* Server starts...

Various things are broken, but it runs!

* [requires.io] dependency update

* [requires.io] dependency update

* [requires.io] dependency update

* FIX: Broken migrations

* FIX: Update auth framework

* FIX: Correct static use in templates

* FIX: Fix supplier sort

* FIX: Remaining tests

* Revert "Disable password reset as temporary fix to vulnerability (#396)"

This reverts commit e0c6a56263.

# Conflicts:
#	RIGS/urls.py

* FIX: Fix broken newlining in PDFs

Introduced by a change in Django 2.1 'HTML rendered by form widgets no longer includes a closing slash on void elements, e.g. <br>. This is incompatible within XHTML, although some widgets already used aspects of HTML5 such as boolean attributes.'

* FIX: Fix some Django4 deprecation warnings

Why not...

* Refactor dependency file

Should now only include dependencies we actually use, not dependencies of dependencies and unused things

* Add newlines to the paperwork print test event

This will catch the error encountered in 79ec9214f9

* Swap to pycodestyle rather than pep8 in Travis

And eliminate W605 errors

* Bit too heavy handed with the dep purge there...

* Whoops, helps if one installs pycodestyle...

* FIX: Re-add overridden login view

* Better fix for previous commit

* FIX: Bloody smartquotes

Co-authored-by: requires.io <support@requires.io>
2020-03-07 16:21:48 +00:00
4a4d4a5cf3 Add authorisation process for sign ups and allow access to EventDetail for basic users (#399)
* CHANGE: First pass at opening up RIGS #233

Whilst it makes it something of a misnomer, the intent is to make the 'view_event' perm a permission to view event details like client/price. I don't see the point in giving everyone 'view_event' and adding a new 'view_event_detail'...Open to arguments the other way.

* CHANGE: New user signups now require admin approval

Given that I intend to reveal much more data to new users this seems necessary...

* CHORE: Fix CI

* FIX: Legacy Profiles are now auto-approved correctly

* Add testing of approval mechanism

This fixes the other functional tests failing because the user cannot login without being approved.

* Superusers bypass approval check

This should fix the remainder of the tests

* Prevent unapproved users logging in through embeds

Test suite doing its job...!

* FIX: Require login on events and event embeds again

Little too far to the open side there Arona... Whooooooops!

* FIX: Use has_oembed decorator for events

* FIX: Re-prevent basic seeing reversion

This is to prevent financials/client data leaking when changed. Hopefully can show them a filtered version in future.

* FIX: Remove mitigation for #264

Someone quietly fixed it, it appears

* FEAT: Add admin email notif when an account is activated and awaiting approval

No async or time-since shenanigans yet!

* FIX: Whoops, undo accidental whitespace change

* FEAT: Add a fifteen min cooldown between emails to admins

Probably not the right way to go about it...but it does work!

TODO: How to handle cooldown-emailing shared mailbox addresses?

* FIX: Remove event modal history deadlink for basic users

Also removes some links on the RIGS homepage that will deadlink for them

* FIX: Wrong perms syntax for history pages

* CHORE: Squash migrations

* FIX: Use a setting for cooldown

* FIX: Minor code improvements
2020-02-29 11:34:50 +00:00
David Taylor
1a49bb50e5 Further version history improvements 2019-07-28 23:40:35 +01:00
David Taylor
35997aa882 Add API hook for logging risk assessment completion (#341) 2019-07-28 23:08:18 +01:00
David Taylor
d8f9256252 Add on_delete=models.CASCADE to OneToOneFields 2018-03-24 23:58:54 +00:00
David Taylor
014bab6c1f Add on_delete=models.CASCADE to all foreign keys. This replicates the previous default behaviour 2018-03-24 23:58:54 +00:00
David Taylor
8872084cab Import URL functions from django.urls 2018-03-24 23:58:39 +00:00
David Taylor
f9389e3996 PEP8 all the things 2017-09-22 14:57:14 +01:00
David Taylor
50c997b568 Fixed profile picture encoding 2017-09-04 23:19:22 +01:00
David Taylor
3035320e82 Run through 2-to-3 converter. This is not in a working state 2017-09-04 23:19:22 +01:00
David Taylor
c178a293a1 Fix model registration and RevisionMixin lookups. Also much more efficient and DRY now 2017-06-19 23:51:56 +01:00
David Taylor
bdd7f02fe2 Add EventAuthorisation to the activity feed 2017-05-25 13:09:52 +01:00
Tom Price
c6b7bbc219 Change to just using online auth for internal clients.
This effectively reverts 067e03b.
2017-05-23 18:19:02 +01:00
David Taylor
f8aaf9f36e Merge branch 'master' into feature/online-auth
# Conflicts:
#	RIGS/rigboard.py
#	RIGS/test_functional.py
#	RIGS/urls.py
#	requirements.txt
2017-05-12 20:53:00 +01:00
David Taylor
e573088c5e Fix some issues caused by changes made over the last year 2017-05-10 17:51:55 +01:00
David Taylor
7ac9eef7a2 Merge master into python-deps
# Conflicts:
#	PyRIGS/settings.py
#	RIGS/admin.py
#	RIGS/models.py
#	RIGS/test_functional.py
#	RIGS/urls.py
#	requirements.txt
#	wercker.yml
2017-05-10 17:32:21 +01:00
Tom Price
331dab20f7 Add basic tracking of when an event authorisation request was sent.
Designed and requested by Ross because he can't remember if he's push a button...
2017-04-19 18:14:36 +01:00
Tom Price
d9076a4f5f Quantize event totals to prevent issues with mixed precision on client authorisation form. 2017-04-19 15:27:12 +01:00
Tom Price
430862b24d Add tracking of who sent the link 2017-04-11 15:52:38 +01:00
Tom Price
067e03b757 Remove Event.purchase_order in favour of a simple EventAuthorisation object. 2017-04-10 23:16:50 +01:00
Tom Price
3b2aa02ae5 Add success notification emails.
Enable RevisionMixin for EventAuthorisation.

Add signal receivers for RIGS.

Expand RIGS into an explicitly defined app to support signals.
2017-04-10 19:16:45 +01:00
Tom Price
e65e97b1a3 Client facing authorisation procedures.
Add forms, views, templates and URLs.

Remove created at in favour of the built in versioning as that's much more accurate.
Switch to a OneToOneField with EventAuthorisation -> event as a result of this.

Move validation from models to forms where it probably belongs.
Provide more descriptive errors.

Add success page for authorisation.
2017-04-07 02:14:33 +01:00
Tom Price
c2787d54b0 Add authorisation models.
Add EventAuthorisation model + migrations

Add authorised property to Event.

Add appropriate tests
2017-03-29 20:46:40 +01:00