Implement Registration Token Administrator API #43

Merged
jordan merged 26 commits from pull-37 into master 2023-11-10 09:30:54 -05:00
Owner

This pull request fully implements and documents all of the registration token administrator API endpoints.

NOTE: There is a memory leak when listing all of the registration tokens. Debug this before merging.
 
Closes Supersedes #37.

Closes #26.

This pull request is based off of #37, which addresses #26. This pull makes a number of improvements to the logic, organization, and behavior of the API endpoints.

This pull request fully implements and documents all of the registration token administrator API endpoints. **NOTE:** There is a memory leak when listing all of the registration tokens. Debug this before merging.   ~~Closes~~ Supersedes #37. Closes #26. This pull request is based off of #37, which addresses #26. This pull makes a number of improvements to the logic, organization, and behavior of the API endpoints.
jordan added the
bug
enhancement
labels 2023-11-08 13:49:59 -05:00
jordan added 24 commits 2023-11-08 13:49:59 -05:00
80db737a28 Make RegToken.grants a JSON array.
It isn't every touched by anything other than UserDecodePrivileges() and UserEncodePrivileges().
f87cce0f4c Clean up behavior of RouteAdminTokens().
This makes it accept keys with the same names as what is returned back to the caller,
allowing for a more consistent experience.
jordan reviewed 2023-11-08 13:57:38 -05:00
@ -0,0 +109,4 @@
RegTokenFree(info);
/* TODO: The JsonValue returned here gets leaked. */
ArrayAdd(tokensarray, JsonValueObject(jsoninfo));
Author
Owner

Here is where the leak is occurring. As you can see, I have added a TODO comment.

I have yet to figure out why this is happening, because it looks like it should work. If anyone wants to take a stab at it (@lda, would you?), you're more than welcome to.

Here is where the leak is occurring. As you can see, I have added a TODO comment. I have yet to figure out why this is happening, because it *looks* like it should work. If anyone wants to take a stab at it (@lda, would you?), you're more than welcome to.
jordan marked this conversation as resolved
jordan added this to the Telodendria v1.7.0-alpha4 project 2023-11-08 13:59:17 -05:00
jordan removed this from the Telodendria v1.7.0-alpha4 project 2023-11-08 14:03:06 -05:00
jordan added 1 commit 2023-11-08 14:40:16 -05:00
Author
Owner

Update: I think the leak is actually coming from a bug in j2s generated code.

**Update:** I think the leak is actually coming from a bug in `j2s` generated code.
Author
Owner

The leak is caused by Telodendria/Cytoplasm#17.

The leak is caused by Telodendria/Cytoplasm#17.
jordan added 1 commit 2023-11-10 09:28:57 -05:00
d73d18e1f7 Remove TODO comment that isn't relevant.
The leak is actually caused by an issue in `j2s`.

See Telodendria/Cytoplasm#17.
jordan changed title from WIP: Implement Registration Token Administrator API to Implement Registration Token Administrator API 2023-11-10 09:29:48 -05:00
jordan merged commit 2d30719be4 into master 2023-11-10 09:30:54 -05:00
jordan deleted branch pull-37 2023-11-10 09:30:55 -05:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Telodendria/Telodendria#43
No description provided.