Closed
Bug 1517494
Opened 7 years ago
Closed 7 years ago
Create a new method listRoles2 (same as listRoles but paginated)
Categories
(Taskcluster :: Services, enhancement)
Taskcluster
Services
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: hassan, Assigned: arshadkazmi42)
Details
We currently have the following methods:
listRoleIds - returns a paginated list of role IDs
listRoles - returns an array of objects of the form { roleId, scopes }
We want to add a third method `listRoles2` which returns the same data as `listRoles` but paginated.
For inspiration, you can have a look at the pull-request[1] that added `listRoleIds`. The implementation of the continuationToken (the way we handle paginaton) in `listRoles2` will be done similar to that pull-request.
[1] https://github.com/taskcluster/taskcluster-auth/pull/189
| Assignee | ||
Comment 1•7 years ago
|
||
I would like to work on this.
Assigning this to myself
Assignee: nobody → arshadkazmi42
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•7 years ago
|
||
I am getting this message on `taskcluster-auth` repo
` This repository has been archived by the owner. It is now read-only.`
It will accept PR's ?
Flags: needinfo?(helfi92)
Comment 3•7 years ago
|
||
Hi Arshad, sorry about that! We moved to a monorepo yesterday, so the code is now in github.com/taskcluster/taskcluster. Do you have a pull request ready to go? If so, I'd suggest the following:
* In your local copy, squash your changes down to a single commit
* Use `git format-patch HEAD^..HEAD --stdout > /tmp/pr.patch` to output that commit
* clone https://github.com/taskcluster/taskcluster
* In that repo, run `git apply --directory services/auth /tmp/pr.patch`
That should transplant the patch to the new repository, where you can then commit, push, and file a PR.
Flags: needinfo?(helfi92)
| Assignee | ||
Comment 4•7 years ago
|
||
Hi Dustin,
Thank you for the detailed steps.
My PR is not ready yet. I will do a fresh clone and create a PR.
Comment 5•7 years ago
|
||
Finished and deployed..
$ curl -s https://auth.taskcluster.net/v1/roles2/?limit=2\&continuationToken=xGhP | head
{
"continuationToken": "zvsO",
"roles": [
{
"expandedScopes": [
"assume:hook-id:project-focus/strings-import",
"queue:create-task:aws-provisioner-v1/tutorial",
"queue:route:notify.email.sebastian@mozilla.com.on-failed",
"secrets:get:project/focus/github"
],
yay!
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Component: Authentication → Services
You need to log in
before you can comment on or make changes to this bug.
Description
•