Michael Desa
e2ac7f8bf0
Use raw organizations store is user is super admin
2017-11-10 15:33:28 -05:00
Michael Desa
f228e2860d
Expose some organization routes to admins
...
Cleanup tests appropriately
Prevent Admins from patching organizations
2017-11-10 12:48:10 -05:00
Michael Desa
590b1857d5
Change UserKey to UserContextKey
...
Fix name of arguments in tests
2017-11-10 11:18:06 -05:00
Michael Desa
94d9d5345e
Prevent user from deleteing themselves
2017-11-10 11:09:16 -05:00
Michael Desa
f25c22444c
Put entire user on context
2017-11-10 11:09:16 -05:00
Michael Desa
35be59a71a
Differentiate between SuperAdminContext and ServerContext
...
Previously, the server just hijacked the super admin context in order to
get raw access to the underlying data stores, this introduces a way to
specify the it is explicitly the server making the request and no longer
hijack the super admin context.
This also adds test coverage to ensure that the correct values are being
set on context in the AuthorizedUser method.
2017-11-10 11:09:16 -05:00
Michael Desa
9b194168a6
Move user roles and role names to roles package
2017-11-06 11:27:13 -05:00
Michael Desa
9ee3b431db
Add roles implementation of sources store
...
Minimal test coverage of Update/Delete/Add methods was done since they
do not involve any filtering. The filtering for them should have
happened at the API level.
2017-11-06 11:24:13 -05:00
Michael Desa
986f86d99c
Fix relevant go-vet/go-lint for server package
2017-11-01 16:43:31 -04:00
Michael Desa
65028027fd
Add comments to DataStore interface and implemntn
2017-11-01 14:24:40 -04:00
Michael Desa
a8a115ec50
Change function signature of hasSuperAdminContext
2017-11-01 10:39:09 -04:00
Michael Desa
0e18f8778b
User explicit type when setting context
2017-11-01 09:49:02 -04:00
Michael Desa
2bd2c81bb7
Add noop implementation of each source type
2017-10-31 18:07:42 -04:00
Michael Desa
cf64b2e506
Remove RawUsers from DataStore
2017-10-31 17:49:35 -04:00
Michael Desa
00b79a45eb
Add org param to New Organizaiton methods
2017-10-31 17:40:58 -04:00
Michael Desa
36e14cb111
Refactor data stores into a common interface
2017-10-31 16:41:17 -04:00