aboutsummaryrefslogtreecommitdiff
path: root/gn_auth/auth/authorisation/resources
AgeCommit message (Collapse)Author
2025-06-11Fix code issue caught by type-checker.Frederick Muriuki Muriithi
2025-06-11Fix code issues caught by the linter.Frederick Muriuki Muriithi
2025-06-09Add inbredset-group resource type in unlinked_data functionzsloan
This still needs to be implemented, but this commit prevents the key error
2025-06-09Enable linking multiple data items to a resource in single request.Frederick Muriuki Muriithi
2025-06-09Add function to fetch the wrapper resource for a specific group.Frederick Muriuki Muriithi
2025-06-09Add a function to fetch the system resource.Frederick Muriuki Muriithi
2025-06-09Check for a user's privileges on a particular resource.Frederick Muriuki Muriithi
Add a general function to check that a particular user has certain privileges on a particular resource.
2025-02-26Fix pylint errors.Frederick Muriuki Muriithi
2025-02-17Use default sys-admin group if user is not a member of any group.Frederick Muriuki Muriithi
Instead of failing, assign any population resource to the default system admin group, if the user is not a member of any group.
2025-02-17Provide a way to fetch a system-administrator's group.Frederick Muriuki Muriithi
2024-11-22Use code in gn_libs for MySQL/MariaDB connection.Frederick Muriuki Muriithi
Update the application to use the gn_libs code for connecting to the database, rather than using a local module.
2024-10-09Put routes behind auth.Frederick Muriuki Muriithi
2024-10-03BugFix: Fetch also roles assigned to userFrederick Muriuki Muriithi
When fetching the resource roles, fetch also any roles that are assigned to the user for that resource.
2024-10-03BugFix: Remove duplicates from resources listFrederick Muriuki Muriithi
Issue: https://issues.genenetwork.org/issues/gn-auth/resources-duplicates-in-resources-list The query was returning multiple instances of the same resource in situations where a user had more than one role of a particular resource.
2024-09-30Refactor: Initialise phenotype packageFrederick Muriuki Muriithi
* Move code into a new phenotypes package and update references. * Add new functions to fetch linked resources from GN3 data identifiers — this is useful for auth * Provide endpoint to fetch authorisation details for a specific phenotype.
2024-09-30Extract function to prevent circular dependencies.Frederick Muriuki Muriithi
2024-09-26Add type annotation to variable.Frederick Muriuki Muriithi
2024-09-26Bugfix: Fix bugs that were preventing creation of geno resourceFrederick Muriuki Muriithi
Fix the bugs that were causing the creation of a genotype resource via API to fail.
2024-09-25Implement genotype resource creation via API with resource dataFrederick Muriuki Muriithi
Create the resource, assign the resource-owner role and link the resource's data in a single API call.
2024-09-25Extract common role assignment to its own moduleFrederick Muriuki Muriithi
2024-09-16Create population resource and assign appropriate rolesFrederick Muriuki Muriithi
Provide an endpoint to create a new population resource (inbredset-group) and assign the active user with the appropriate privileges against the new resource.
2024-09-16Rename blueprint and register it one level lowerFrederick Muriuki Muriithi
Register the populations/inbredset blueprint with the "resources" blueprint rather than at the higher level "auth" blueprint to retain the hierarchy of the blueprints and make maintenance arguably easier.
2024-09-16Pass cursor rather than connection to create_resource functionFrederick Muriuki Muriithi
In order to decouple the `create_resource` function from the related functions that assign roles to users, this commit changes the code to pass in a cursor rather than a connection. The cursor will be the same cursor passed into the role assignment functions ensuring that the resource creation and role assignment happen in a single transaction.
2024-09-13Notes: Add note on some items that could go into hooks.Frederick Muriuki Muriithi
2024-08-15Fix a bunch of linting errors.Frederick Muriuki Muriithi
2024-08-15fix: bugs in masquerade apiJohn Nduli
2024-08-05Fix linting errors.Frederick Muriuki Muriithi
2024-08-01Handle generic exception and return a value.enable-key-rotationFrederick Muriuki Muriithi
2024-07-31Ignore warning from mypy.Frederick Muriuki Muriithi
2024-07-31Remove obsoleted SSL_PRIVATE_KEY configurationFrederick Muriuki Muriithi
With the key rotation in place, eliminate the use of the SSL_PRIVATE_KEY configuration which pointed to a specific non-changing JWK.
2024-07-17Add non-interactive script to assign make data public by default.Frederick Muriuki Muriithi
2024-06-25Roles: Get rid of use of GroupRole; use Role directly for resourcesFrederick Muriuki Muriithi
The GroupRole idea was flawed, and led to a critical bug that would have allowed privilege escalation. This uses the Role directly acting on a specific resource when assigning said role to a user.
2024-06-20Reorganise test fixtures. Fix tests and issues caught.Frederick Muriuki Muriithi
Reorganise test fixtures to more closely follow the design of the auth system. Fix the broken tests due to refactors and fix all issues caught by the running tests.
2024-06-18fix mypy errorsFrederick Muriuki Muriithi
2024-06-17Fix mypy errorsFrederick Muriuki Muriithi
2024-06-17Remove obsolete endpoint.Frederick Muriuki Muriithi
2024-06-17Fix linting errorsFrederick Muriuki Muriithi
2024-06-17Remove deprecated endpoint.Frederick Muriuki Muriithi
2024-06-17Retrieve complete list of a users roles on a particular resource.Frederick Muriuki Muriithi
2024-06-17Fix linting errors.Frederick Muriuki Muriithi
2024-06-17Create a resource role.Frederick Muriuki Muriithi
2024-06-17Don't save the resource-owner role as a resource roleFrederick Muriuki Muriithi
The 'resource-owner' role is a system-default role that applies to most resources, but should not be editable by users. This commit removes the code that was linking the role with each resource, leading it to being presented to the user as a editable role.
2024-06-17Use the form's json attribute to retrieve sent dataFrederick Muriuki Muriithi
The system uses JSON as the default communication format, so we use the form's json attribute to get any data sent.
2024-06-11Fix typo.Frederick Muriuki Muriithi
2024-06-11Temporary fix to retrieve users with read access to resource.Frederick Muriuki Muriithi
2024-06-11List users assigned a particular role on a specific resource.handle-role-privilege-escalationFrederick Muriuki Muriithi
2024-06-11Import the symbols we use in the module directly.Frederick Muriuki Muriithi
Import the modules directly to help with reducing line-length and unnecessary typing.
2024-06-11Unassign privilege from resource role.Frederick Muriuki Muriithi
2024-06-10Fetch a role by its ID.Frederick Muriuki Muriithi
2024-06-10Use new db resultset conversion functions.Frederick Muriuki Muriithi