Rewrite identity and access management
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -17,8 +17,8 @@ package coredata
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"go.probo.inc/probo/pkg/gid"
|
||||
"github.com/jackc/pgx/v5"
|
||||
"go.probo.inc/probo/pkg/gid"
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -62,6 +62,10 @@ func NewScope(tenantID gid.TenantID) *Scope {
|
||||
}
|
||||
}
|
||||
|
||||
func NewScopeFromObjectID(objectID gid.GID) *Scope {
|
||||
return NewScope(objectID.TenantID())
|
||||
}
|
||||
|
||||
func (s *Scope) SQLArguments() pgx.StrictNamedArgs {
|
||||
return pgx.StrictNamedArgs{
|
||||
"tenant_id": s.tenantID,
|
||||
|
||||
Reference in New Issue
Block a user