From 05b3d2917babb73429d63fbc90dedddb75f47474 Mon Sep 17 00:00:00 2001 From: Timothy Messier Date: Tue, 9 Aug 2022 12:40:02 +0000 Subject: [PATCH] feat(perms): Add UserPermissions This is used to associate a user with a set of permissions which is necessary for repositories that need honor the OnlySelf aspect of a Permission. --- internal/perms/acl.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/perms/acl.go b/internal/perms/acl.go index 589480bb0a..47ab170dfa 100644 --- a/internal/perms/acl.go +++ b/internal/perms/acl.go @@ -40,6 +40,12 @@ type Permission struct { All bool // We got a wildcard in the grant string's `id` field. } +// UserPermissions is a set of Permissions for a User. +type UserPermissions struct { + UserId string + Permissions []Permission +} + // Resource defines something within boundary that requires authorization // capabilities. Resources must have a ScopeId. type Resource struct {