@rivascva/dt-idl 1.1.95 → 1.1.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/go/auth/utils.go +3 -3
- package/package.json +1 -1
package/go/auth/utils.go
CHANGED
|
@@ -33,8 +33,8 @@ func CanActorAccessResourcesForUser(ctx context.Context, userId string) (bool, e
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
//
|
|
37
|
-
func
|
|
36
|
+
// CanActorAccessAllResources checks if the actor is allowed to access all resources.
|
|
37
|
+
func CanActorAccessAllResources(ctx context.Context) (bool, error) {
|
|
38
38
|
// get the actor id from the context
|
|
39
39
|
actorId, err := utils.GetActorIdFromContext(ctx)
|
|
40
40
|
if err != nil {
|
|
@@ -47,7 +47,7 @@ func CanActorAccessResourcesForAll(ctx context.Context) (bool, error) {
|
|
|
47
47
|
return false, fmt.Errorf("failed to get the token type from the context: %w", err)
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
// check if the actor is
|
|
50
|
+
// check if the actor is a service
|
|
51
51
|
switch tokenType {
|
|
52
52
|
case "user":
|
|
53
53
|
return false, nil
|