Commit Graph

1702 Commits

Author SHA1 Message Date
b949770838 pep eiiiiiight 2020-04-14 21:01:02 +01:00
e78a474290 Modify audit exclusions to properly prevent data loss 2020-04-14 20:54:41 +01:00
c291a211b0 Fix for my fix... 2020-04-13 16:57:10 +01:00
cd54ad944b Fix migrations again 2020-04-13 16:50:16 +01:00
8e62a5bfeb Merge branch 'master' into assets_audit
# Conflicts:
#	assets/models.py
# Migrations
2020-04-13 16:49:59 +01:00
0e648329f7 Use aware time in audit 2020-04-13 16:47:54 +01:00
0fe7d55eab Fix for existing invalid cable types
Also hotfix against more in the future. Proper rework needed...This is why I should have waited for review...! Lesson learnt?
2020-04-13 16:33:57 +01:00
be4a7baf8e Remove obsolete 'next_scheduled_maint' from asset model
Should fix production data...
2020-04-13 16:14:06 +01:00
c33ddaee37 Fix README badges to point to right branch
While I'm here eh :P
2020-04-13 16:00:44 +01:00
c11cbaccfb Merge branch 'master' into assets_audit
# Conflicts:
#	assets/models.py
2020-04-13 15:59:08 +01:00
a0491891e9 Add 'CableTypes' (#406)
* Move relevant fields and create migration to autogen cable types

* CRUD and ordering

* FIX: Prevent creating duplicate cable types

* FIX: pep8/remove debug print

* FIX: Meta migrations... :>

* FIX: Update tests to match new UX

* Move cabletype menu links into 'Assets' dropdown

* Fix migration

* Specify version of reportlab

Should fix CI - looks like I went a bit too ham-handed in my requirements.txt purge last time...
2020-04-13 15:54:43 +01:00
afeee3b552 Remake migrations 2020-04-13 01:07:07 +01:00
39b1ff7c2f Merge branch 'master' into assets_audit 2020-04-13 01:00:01 +01:00
02d40d1b39 FIX: Patch for choices being none
Honestly no idea if this is going to work, I can't reproduce the issue locally...
2020-03-07 16:47:30 +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
2bfde0510c Merge branch 'master' into assets_audit 2020-03-03 19:36:25 +00:00
David Taylor
797ad778a9 Improve search logic and allow search of event archive (#248)
* Added search to person, venue, organisation and event archive

* Added search to invoice archive

* Added event search to homepage

* Tidy up event search logic and optimise

* Fixed merge issues

* Stopped 404 on failed search

* Set default ordering of people, organisations & venues to alphabetical (rather than order of addition to database)

* Added invoice search to home page (if you have permissions)

* Made invoice archive sort by reverse invoice date (rather than order added to database)

* Added search help page (very pretty)

* Made single search box for all search types

* FIX: Missing date field breaking archive view

* FEAT: Add omnisearch to header

Tis a bit broken on mobile at the moment...

* CHORE: Conform old code to pep8

* FIX: Select the event form, not the search one in tests!

* Revert "FEAT: Add omnisearch to header"

This reverts commit 6bcb242d6b because it caused MANY more problems than anticipated...

* FIX: Stop 404 on failed search, again

* FEAT: Basic testing of search

* Use a tooltip to help explain the UX

Obviously since it needs a tooltip it isn't brilliant UX but the best I can think of for now...

Co-authored-by: Tom Price <tom@codedinternet.com>
Co-authored-by: David Taylor <david@taylorhq.com>
Co-authored-by: Arona Jones <aj@aronajones.com>
2020-02-29 11:57:33 +00:00
a05a5d5ccc Merge branch 'master' into assets_audit 2020-02-29 11:43:38 +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
24284f9d55 FIX?: What about this way... 2020-02-27 09:55:27 +00:00
1f663c8919 FIX?: Up WebDriverWait timeout for modal tests 2020-02-27 09:30:38 +00:00
aa4977edb5 Potentially make modal tests more consistent 2020-02-25 16:44:56 +00:00
742e90fa13 Remember to test the tests Arona 2020-02-24 17:40:00 +00:00
94412da545 Improve asset audit testing 2020-02-24 17:36:04 +00:00
db7440e9da Some deduplication for testing code 2020-02-23 23:42:18 +00:00
da0c9ba87b Start tests for audit 2020-02-23 23:31:12 +00:00
e5a1830b00 FIX: Migrations 2020-02-18 16:04:03 +00:00
da48a75073 FIX: Hide asset detail buttons for basic users 2020-02-18 16:00:33 +00:00
b9434dc576 FIX: Stop quickbuttons being tab-selected
If someone's tabbing through, they won't be needing the buttons...
2020-02-17 21:27:26 +00:00
75660644eb FEAT: More handy buttons 2020-02-17 21:25:25 +00:00
6e15f12fbf FIX: Fix asset sample data command when run alone 2020-02-17 16:29:25 +00:00
68891dccd2 FEAT: Add buttons for some common defaults on audit form
TODO: Partialise those fragments and add them to the edit/create forms too.
2020-02-17 13:10:51 +00:00
759faf30f1 FIX: Gracefully handle 404s in audit search 2020-02-17 13:00:35 +00:00
0c12a3efdb Improve sample data generator
Does reversion properly and sets colours for asset statuses
2020-02-16 18:46:12 +00:00
20d9a71a9e FIX: Remove assets from to-be-audited table when audited
Previously required a page reload
2020-02-16 15:49:53 +00:00
54ec38f7e1 Various UX Improvements
Also rearranged asset detail/edit to be more space efficient
2020-02-16 15:37:09 +00:00
ed5339925e FIX: Revert partialising of asset search 2020-02-16 02:41:36 +00:00
0b2fc6d57c Added cable functionality to audit form
Also improved styling
2020-02-16 02:34:33 +00:00
1ec277978e Filter asset audit list by never-audited 2020-02-15 12:54:31 +00:00
e656b90a22 Improve audit search bar
Optimise for APM!
2020-02-15 12:54:12 +00:00
7c42ad853c WIP: Javascript shenanigans for asset audit search
It's not clean but it works..
2020-02-14 17:20:50 +00:00
e7fcaa36bb WIP: Audit modal works
Need to get the ID search working.
2020-02-14 11:47:05 +00:00
e9a9250027 WIP: Basic work on audit 2020-02-10 00:09:46 +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
dependabot[bot]
116c497590 Bump pillow from 5.1.0 to 6.2.0 (#371)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 5.1.0 to 6.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/5.1.0...6.2.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: Arona Jones <aj@aronajones.com>
2020-02-08 13:09:09 +00:00
f6f3149036 Merge pull request #397 from nottinghamtec/imgbot
[ImgBot] Optimize images
2020-02-08 13:00:00 +00:00
ImgBotApp
81e7bf6d46 [ImgBot] Optimize images
*Total -- 171.82kb -> 169.55kb (1.32%)

/RIGS/static/fonts/glyphicons-halflings-regular.svg -- 106.19kb -> 103.92kb (2.14%)
/RIGS/static/imgs/paperwork/corner-tr-su.jpg -- 65.63kb -> 65.63kb (0.01%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2020-01-21 16:46:49 +00:00
79f97bb05f Merge pull request #395 from nottinghamtec/misc
Miscellaneous changes/fixes
2020-01-21 16:40:00 +00:00
6ba87b0a5a CHANGE: Restructure the asset embed a bit
Should fix the forum mangling
2020-01-21 01:45:59 +00:00
1e03b5107e FIX: Rig Creation Test breaking on CI
Squashed commit messages below:
Also...
FIX: Person selection workflow in tests now works
FIX: Properly test name requirement in rig creation
And removed the dirty workaround for wercker so that the test no longer passes when it shouldn't. Which led to this mess of attempted fixes, now squashed:

Fine. Hardball.
What about if we click the button a different way...
Disable whole chunk of the test that was previously getting skipped
Perhaps you'd like to pass now Travis
Temporarily disable the offending part of the test.

Something odd is going on...TBC.
Reorder some selenium commands to try and fix test only failing on CI.
Another attempt at a CI test fix
FIX: Should fix rig create test failing on CI
2020-01-21 01:45:59 +00:00