Skip to content

Add support for token management #320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Jul 9, 2024
Merged

Add support for token management #320

merged 18 commits into from
Jul 9, 2024

Conversation

toppercodes
Copy link
Contributor

No description provided.

@lukasmalkmus
Copy link
Collaborator

lukasmalkmus commented Jul 8, 2024

Left some comments, most of them rather trivial.

One bigger change I wanna discuss is the package level capabilities API.

My feeling is that the capabilities should be typed (permissions?). E.g.:

cap := map[string]DatasetCapabilities{
	"dataset": {
		Ingest: []string{"create"},
		Query:  []string{"read"},
	},
}

becomes:

cap := map[string]DatasetCapabilities{
	"dataset": {
		Ingest: []Permission{PermissionCreate},
		Query:  []Permission{PermissionRead},
	},
}

Maybe Permission -> APIPermission but you get the idea. I think a prefix for the constants is a must because their names are to generic (essentially just CRUD verbs).

For an implementation, see UserRole in users.go.

@toppercodes toppercodes enabled auto-merge (rebase) July 9, 2024 12:33
Copy link
Collaborator

@lukasmalkmus lukasmalkmus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three mini fixes. But please do add the unit tests for Action, tho.

@toppercodes toppercodes merged commit b9b65cb into main Jul 9, 2024
24 checks passed
@toppercodes toppercodes deleted the AXM-3573 branch July 9, 2024 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants