Commit Graph

106 Commits

Author SHA1 Message Date
88ac1b93ae Re-enable calendar 2020-03-10 18:03:05 +00:00
4d845309c9 btn-default -> btn-secondary 2020-03-10 17:20:13 +00:00
3b8789e49e More refactoring of rigboard 2020-03-10 16:46:53 +00:00
1526a2f22b Start to move search bar into header
Broken because my scripts are all over the place
2020-03-10 14:33:50 +00:00
fe71f7640f Migrate user urls to PyRIGS module 2020-03-10 14:08:47 +00:00
b57716f7fc Port from glyphicons to Font Awesome
Mmmm pretty
2020-03-09 23:18:56 +00:00
320c43e472 Initial refactor of rigboard template 2020-03-09 22:44:54 +00:00
1e5fcbdba0 Mostly reimplement rigboard navbar 2020-03-09 22:36:22 +00:00
1df1784d02 Move rigboard templates up a level
Also:
- Find and replace panel -> card
- Some base template work
- gulpfile things, added dep on django-gulp
2020-03-09 21:44:09 +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
ae151ed45e Add assets test suite (#400)
* Started POM and assets test

* FEAT: Adapt unit tests from RIGS to assets

* CHORE: pep8...

* Added Asset Create and Edit forms

* Add non-cable asset creation test

* CHORE: Frickin pep8...

* Add cable asset creation test

* Basic asset create validation testing

* Asset edit tests are here

A bit dodgy in places but par for the course for me :P

* Add access level tests

* Delete unused code

Much less effort way to increase coverage stats :D

* Add delete sample data test for completeness

Chasing that sweet 100% coverage...

* Add supplier list page + tests

Also fix the supplier page not being ordered alphabetically

* Helps if I add the migration...

* Add supplier create/edit tests

* Asset duplicate tests

Also fixed some random bugs

* Asset search tests

* 404 tests and test that everything requires authentication

* Test visibility of form errors

And fix supplier form not displaying errors correctly!

* Fix broken search test


Co-authored-by: Matthew Smith <mattysmith22@googlemail.com>
2020-02-08 13:52:07 +00:00
4ad12ab40a FIX: Prevent basic users seeing individual asset version history
I prevented them from seeing the change stream, didn't prevent them seeing individual histories. This has to be done as otherwise it leaks financial information. If I can be arsed I'll come back to this and allow basic users to see a filtered version.
2020-01-11 21:13:50 +00:00
82a30ca77d Miscellaneous changes to the Asset DB (#390)
* FIX #388: Prevent assets losing supplier data on edit

* FEAT: Add associated assets to supplier detail view

* FIX: Tweak supplier list to make detail view accessible

* Potential fix for #380

No idea if it works because I can't reproduce locally. S/O Reckons it should... :P

* FEAT #386: Asset search searches serial number.

Pending addition of advanced search.

* FIX: Order asset categories/statuses alphabetically

Instead of by pk because that's silly.

* FEAT: Statuses can have a CSS class defined in the admin panel

This replaces the hardcoding of colours in the asset list.

* FIX: Squash migrations

* Fixed supplier not working on all the create asset template

* Refactored away "assets" property on "Supplier" by using "related_name" instead

Co-authored-by: Matthew Smith <mattysmith22@googlemail.com>
2020-01-03 21:46:39 +00:00
01a87e0e0b FEAT: Add revision history to assets and suppliers (#387)
* FEAT: Initial work on revision history for assets

The revision history for individual items mostly works, though it shows database ID where it should show asset ID. Recent changes feed isn't yet done.

* FEAT: Initial implementation of asset activity stream

* CHORE: Fix pep8

* FIX: Asset history table 'branding'

* FIX: Individual asset version history is now correctly filtered

* FEAT: Make revision history for suppliers accessible

* CHORE: *sings* And a pep8 in a broken tree...

* Refactored out duplicated code from `AssetVersionHistory

* CHORE: pep8

And another random bit of wierd whitespace I found

Co-authored-by: Matthew Smith <mattysmith22@googlemail.com>

Closes #358
2019-12-31 12:25:42 +00:00
4f036af85a Create the Asset Database (#363) 2019-12-04 23:14:27 +00:00
David Taylor
5f8a77586a Revert "Add warning"
This reverts commit e5b7fdbae1.
2018-10-07 00:30:00 +01:00
David Taylor
e5b7fdbae1 Add warning 2018-09-13 14:01:44 +01:00
David Taylor
f3c020b613 Update email templates to avoid using bootstrap. Should improve speed, and also cross-email-client compatability 2017-05-18 15:27:50 +01:00
Tom Price
4b87b0a196 Add some visual indicators that authorisations have been submitted.
This will show teccies and clients that RIGS is processing emails which can take a short while.
Should prevent duplicate sending.
2017-05-17 19:08:51 +01:00
Tom Price
f57ac3acb1 Add sending of html email for the request 2017-05-09 18:35:29 +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
92c77c07e0 Fix tailing line breaks 2016-10-11 18:47:13 +01:00
David Taylor
2d5f768523 Added cookie check with nice error message 2016-10-09 10:32:58 +01:00
David Taylor
5949ff74ec Added javascript cookie check, if blocked, login in new tab 2016-10-08 22:55:27 +01:00
David Taylor
008edd8bee Lots of tidying up, moved inline CSS into SCSS 2016-10-08 19:32:45 +01:00
David Taylor
ac7e85c24a PEP8 and comments 2016-10-08 17:30:23 +01:00
David Taylor
7e379b33db Fixed login autofocus and error messages 2016-10-07 02:24:24 +01:00
David Taylor
5e9f7e2c63 More prettying 2016-10-06 17:00:45 +01:00
David Taylor
3f752cd7b7 Made embed prettier 2016-10-06 16:48:19 +01:00
David Taylor
25a3ef3f0c Don't login in new window 2016-10-06 16:15:53 +01:00
David Taylor
441a2be0b8 Added embedded login, and all iframe links open in new tab 2016-10-06 16:08:01 +01:00
David Taylor
4b94ea7ef2 Made login redirect JS for event detail 2016-10-06 12:02:44 +01:00
David Taylor
0244f5cfca Restored login security to events 2016-10-05 10:42:49 +01:00
David Taylor
6370679b62 Initial proof of concept 2016-10-03 22:45:57 +01:00
Tom Price
4f839d05f9 Fix issues with special characters in registration email subject.
Closes #251
2016-07-11 23:28:15 +01:00
David Taylor
01d2eae7bc More invoice UI improvements - makes colouring consistent - also closes #242 2016-07-10 11:14:24 +01:00
David Taylor
a769486c9c Changed order of invoice menu items to make it more intuitive (now in order of workflow) 2016-05-29 21:37:14 +01:00
David Taylor
83302c4439 Invoice UI improvements. Renamed pages, added description, and added total number of events 2016-05-29 21:30:05 +01:00
David Taylor
db58c113aa Changed font to load over https - #236 2016-05-28 14:52:48 +01:00
Tom Price
54dc29b4b2 Switch to jquery CDN who provide a sha256 hash to validate against.
Advise is now to always use HTTPS for libraries as somebody else manages the certificate it will always validate and it makes sure that a large target doesn't get subject to MITM attack.
2016-03-17 17:18:42 +00:00
Harry Bridge
5d48d75f34 Make protocol-agnostic 2016-03-12 18:17:03 +00:00
Harry Bridge
92beb8bf79 Fixed jquery version 2016-03-12 18:12:39 +00:00
David Taylor
8279bec4bf Removed warning message at top - closes #203 2016-03-10 11:46:28 +00:00
David Taylor
e0d03c2cc3 Made username field autofocus (using HTML5 Attribute). Fixes #193 2016-02-12 16:27:11 +00:00
Tom Price
0a30a99e1f Absolish the captcha from the login page. 2016-01-04 23:37:11 +00:00
Tom Price
aa76c6c775 Add missing raven js file. 2015-11-10 11:58:07 +00:00
Tom Price
2e1ab96186 Add Sentry logging 2015-11-10 11:06:52 +00:00
Tom Price
0c11da4665 Add a careful reminder about booking rigs 2015-10-06 22:59:05 +01:00
David Taylor
0a55d373f2 Fix logout/login infinite loop
(Since there are now no pages accessible without login, there is no need for the login link to have the "next" parameter)
2015-06-28 22:35:52 +01:00