Age | Commit message (Collapse) | Author |
|
* gn3/api/general.py: Delete rdf import. Delete trailing white
spaces.
* gn3/api/metadata.py: Delete trailing white spaces.
|
|
* gn3/api/metadata.py: import RemoteDisconnected.
(jsonify_dataset_metadata): Wrap get_dataset_metadata in try block.
|
|
* gn3/auth/authorisation/groups.py: base `MembershipError` on new
`AuthorisationError` base exception. Use new authentication checking
decorator.
* gn3/auth/authorisation/privileges.py: Change argument to User object rather
than UUID object
* gn3/auth/authorisation/roles.py: Use new authentication checking decorator.
* tests/unit/auth/test_groups.py: use `conftest.TEST_USER`
* tests/unit/auth/test_privileges.py: use `conftest.TEST_USER`
* tests/unit/auth/test_roles.py: use `conftest.TEST_USER`
|
|
* gn3/auth/authentication/checks.py: new `authenticated_p` decorator to apply
on any function that requires the user to be authenticated before it runs.
* gn3/auth/authorisation/checks.py: use a `auth.authentication.users.User`
object rather than a UUID object in the global `g`.
* gn3/auth/authorisation/groups.py: Implement the `authenticated_user_group`
function to get the group(s) in which the currently authenticated user
belongs.
* gn3/auth/authorisation/resources.py: Implement the `create_resource`
function correctly.
* tests/unit/auth/conftest.py: extract the User objects into a global variable
for reusability with the tests.
* tests/unit/auth/test_resources.py: Use global user objects from conftest in
the tests. Set a User object (rather than UUID) in the global `g` variable.
|
|
* gn3/auth/authentication/exceptions.py: define `AuthenticationError`
* gn3/auth/authorisation/exceptions.py: define `AuthorisationError`
|
|
* gn3/auth/authorisation/resources.py: Define Resource and ResourceCategory
classes. Create the `create_resource` stub.
* tests/unit/auth/test_resources.py: test for `create_resource` function
|
|
* gn3/api/general.py: (dataset_metadata) Delete.
* gn3/api/metadata.py: Import Blueprint, jsonify, current_app,
SPARQLWrapper and get_dataset_metadata.
(metadata): New Blueprint
(jsonify_dataset_metadata): New function/end-point.
* gn3/app.py: Import metadata
(create_app): Register metadata blueprint.
|
|
* gn3/auth/authorisation/groups.py: Assign the group leader at group creation
time.
* tests/unit/auth/test_groups.py: Ensure the group leader is only ever a
member of a single group.
|
|
* gn3/auth/authorisation/groups.py: Add `GroupRole` type. Fix typing
annotations. Fix bugs.
* tests/unit/auth/conftest.py: Fix bugs.
* tests/unit/auth/test_groups.py: Fix test to run.
|
|
* migrations/auth/20221117_02_fmuZh-create-group-users-table.py: new migration
* tests/unit/auth/test_migrations_create_tables.py: test new migration
* tests/unit/auth/test_migrations_indexes.py: test new migration
|
|
* tests/unit/auth/conftest.py: Add fixtures to help with testing
* tests/unit/auth/test_groups.py: Add incomplete and failing test
|
|
* gn3/auth/authentication.py -> gn3/auth/authentication/__init__.py: Convert
module to package
* gn3/auth/authentication/users.py: Define the `User` type
|
|
|
|
* migrations/auth/20221117_01_RDlfx-modify-group-roles-add-group-role-id.py:
new migration
* tests/unit/auth/test_migrations_add_remove_columns.py: test new migration
|
|
|
|
|
|
* migrations/auth/20221116_01_nKUmX-add-privileges-to-group-leader-role.py:
new migration to fix data errors.
* tests/unit/auth/test_privileges.py: test privileges
|
|
* gn3/auth/authorisation/privileges.py: Set id to UUID type
* gn3/auth/authorisation/roles.py: fix parameters to types that sqlite3
supports
* gn3/auth/db.py: add logging for errors and re-raise the exception
* tests/unit/auth/test_roles.py: fix test
|
|
* tests/unit/auth/test_roles.py: new tests.
|
|
* gn3/db/rdf.py: Delete gn3.setting.SPARQL_ENDPOINT import.
(sparql_query): Inject SPARQLWrapper.
(get_dataset_metadata): Ditto.
|
|
|
|
* gn3/auth/authorisation/checks.py: Return results of calling the function
rather than a dict of values that include the results.
* gn3/auth/authorisation/groups.py: Use the newer form of `authorised_p`
decorator.
* tests/unit/auth/test_groups.py: Update tests
|
|
Use specified types for privileges, roles and types rather than using strings
to help with limiting bugs.
* gn3/auth/authorisation/groups.py: Specify and use the `Group` type
* gn3/auth/authorisation/privileges.py: Specify and use the `Privilege` type
* gn3/auth/authorisation/roles.py: Specify the `Role` type. Add the
`create_role` function.
|
|
|
|
|
|
|
|
* gn3/auth/authorisation/__init__.py: delete function
* gn3/auth/authorisation/checks.py: move function to `checks` module
|
|
|
|
|
|
* tests/unit/auth/conftest.py: use the functions in `gn3.auth.db` to acquire
the database connection and cursor since they handle some of the basic
issues like rollback and commit, meaning we do not have to explicitly handle
said issues in the fixtures.
|
|
* tests/unit/auth/test_groups.py: use Flask's application context directly
rather than the request context to access `g` in order to get rid of the
`DeprecationWarning`.
|
|
|
|
* The test app and the test client are both needed as fixtures in different
places
|
|
* migrations/auth/20221114_05_hQun6-create-user-roles-table.py: new migration
* tests/unit/auth/test_migrations_create_tables.py: test new migration
* tests/unit/auth/test_migrations_indexes.py: test new migration
|
|
* gn3/auth/authorisation/__init__.py: Add `authorised_p` decorator to be used
for all function requiring authorisation.
* gn3/auth/authorisation/groups.py: Add `create_group` function stub
* tests/unit/auth/conftest.py: Add fixture for test users
* tests/unit/auth/test_groups.py: Add tests for `create_group`
|
|
Some roles will not be user editable to prevent inconsistencies, and possible
privilege escalation.
* migrations/auth/20221110_05_BaNtL-create-roles-table.py: Add `user_editable`
column to table
* migrations/auth/20221114_04_tLUzB-initialise-basic-roles.py: Set
`group-leader` role as not user editable
|
|
* migrations/auth/20221114_04_tLUzB-initialise-basic-roles.py: new migration
* tests/unit/auth/test_migrations_insert_data_into_empty_table.py: test new
migration
|
|
* migrations/auth/20221110_05_BaNtL-create-roles-table.py: modify migration
* migrations/auth/20221114_03_PtWjc-create-group-roles-table.py: new migration
* tests/unit/auth/test_migrations_create_tables.py: test new migration
* tests/unit/auth/test_migrations_indexes.py: test new migration
|
|
Drop the `generic_role*` tables, since what they were envisioned for can be
handled a different, (arguably) more simple way.
* migrations/auth/20221114_02_DKKjn-drop-generic-role-tables.py: new migration
* tests/unit/auth/test_migrations_drop_tables.py: test new migration
|
|
* Name all tests that test migrations to start with `test_migrations_`
|
|
Add table `generic_role_privileges` table to link the generic roles to the
privileges they provide.
* migrations/auth/20221114_01_n8gsF-create-generic-role-privileges-table.py:
new migration
* tests/unit/auth/test_create_table_migrations.py: test new migration
* tests/unit/auth/test_migrations_indexes.py: test new migration
|
|
* migrations/auth/20221113_01_7M0hv-enumerate-initial-privileges.py: new
migration.
* tests/unit/auth/test_migrations_insert_data_into_empty_table.py: test new
migration.
|
|
* .gitignore: ignore all yoyo configuration files
* README.md: Update documentation
* yoyo.auth.ini: stop tracking the yoyo configuration file.
|
|
* migrations/auth/20221110_08_23psB-add-privilege-category-and-privilege-description-columns-to-privileges-table.py:
new migration
* tests/unit/auth/test_migrations_add_remove_columns.py: test new migration
|
|
|
|
* migrations/auth/20221110_07_7WGa1-create-role-privileges-table.py: new
migration
Commit ee72678fabb86d66ba7d61d26643cc73df94ee5d only contains tests for this
migration.
|
|
* tests/unit/auth/test_create_table_migrations.py: new migration
* tests/unit/auth/test_migrations_indexes.py: test new migration
|
|
* migrations/auth/20221110_06_Pq2kT-create-generic-roles-table.py: new
migration
* tests/unit/auth/test_create_table_migrations.py: test new migration
|
|
* migrations/auth/20221110_05_BaNtL-create-roles-table.py: new migration
* tests/unit/auth/test_create_table_migrations.py: test new migration
* tests/unit/auth/test_migrations_indexes.py: test new migration
|
|
* migrations/auth/20221110_04_6PRFQ-create-genotype-resources-table.py: new
migration
* tests/unit/auth/test_create_table_migrations.py: test new migration
|