24 Commits

Author SHA1 Message Date
graham-dds
108f65f928 Use pendulum for datetime operations when possible
Currently, we use both Python's built-in datetime library and Pendulum
to do datetime operations. For the sake of consistency, we should try to
stick to one library for datetimes. We could have used either, but
Pendulum has a more ergonomic API, so I decided to go with it when
possible.

The places where were we didn't / couldn't replace datetime are:
- checking instances of datetimes. Pendulum's objects are subclasses of
  python native datetime objects, so it's still useful to import
  datetime in those cases of using is_instance()
- WTForms date validators expect datetime style string formats --
  Pendulum has its own format for formatting/ parsing strings. As such,
  our custom validator DateRange needs to use datetime.stptime() to
  account for this format.
2020-02-17 10:38:52 -05:00
leigh-mil
614514d6a2 Update tables to match business logic 2019-12-02 14:46:11 -05:00
leigh-mil
feb24b8e16 Break class method for ccpo perms into two methods instead of switching on a kwarg to determine if perms are given or removed 2019-08-09 11:08:23 -04:00
leigh-mil
5b008e044a Add tests 2019-08-09 10:50:34 -04:00
leigh-mil
90ae235cd0 Create query to get all CCPO users 2019-08-05 16:04:31 -04:00
leigh-mil
215c2b4cbc Updates from PR feedback 2019-04-03 12:24:02 -04:00
leigh-mil
610aef428d Add user's last login to the session data 2019-04-03 12:24:02 -04:00
dandds
7c5e931c67 throw error for missing permission_sets in PermissionSets.get_many 2019-03-21 05:38:28 -04:00
dandds
bec5d11bfe users have permission sets for site-wide perms 2019-03-21 05:38:28 -04:00
dandds
d3c3209fc0 cleanup unused portfolio roles 2019-03-15 07:14:49 -04:00
dandds
8af23fda36 make unpermitted attribute handling in Users.update more specific 2018-10-16 09:37:59 -04:00
dandds
ec7504fb20 add update method to Users repo 2018-10-16 09:18:13 -04:00
Montana
3c95063293 Handle AlreadyExistsError on user creation with non-unique email 2018-10-08 10:36:40 -04:00
Montana
685c0e3658 Make the requirement for dod_id explicit when creating a user 2018-10-01 17:11:36 -04:00
richard-dds
519b5caa4c Fix tests that were broken by new constraints 2018-09-21 14:00:01 -04:00
richard-dds
13146e9362 Implement log_in_user 2018-08-06 10:44:00 -04:00
richard-dds
df0b4e64c0 Add Users.get_by_dod_id 2018-08-06 10:44:00 -04:00
richard-dds
c6af29f213 Simplify method signatures in Users 2018-08-06 10:44:00 -04:00
richard-dds
b72a16569f Convert Users, Roles, WorkspaceUsers, TaskOrders to use classmethods 2018-08-06 10:44:00 -04:00
dandds
45b47c41bf update tests for Flask 2018-08-02 16:03:54 -04:00
richard-dds
206b7f7b2b Remove unnecessary type hint 2018-07-31 11:50:33 -04:00
richard-dds
d207b259cf Fix linting errors 2018-07-31 11:50:33 -04:00
richard-dds
efdf0b04ba Formatting 2018-07-31 11:50:33 -04:00
richard-dds
08243a199a Add domain tests for all of authz 2018-07-31 11:50:33 -04:00