@@ -222,7 +222,7 @@ func (s Service) AddProjectToResource(ctx context.Context, project model.Project
222222
223223 rel := model.Relation {
224224 ObjectNamespace : resourceNS ,
225- ObjectId : resource .Id ,
225+ ObjectId : resource .Idxa ,
226226 SubjectId : project .Id ,
227227 SubjectNamespace : definition .ProjectNamespace ,
228228 Role : model.Role {
@@ -241,7 +241,7 @@ func (s Service) AddOrgToResource(ctx context.Context, org model.Organization, r
241241
242242 rel := model.Relation {
243243 ObjectNamespace : resourceNS ,
244- ObjectId : resource .Id ,
244+ ObjectId : resource .Idxa ,
245245 SubjectId : org .Id ,
246246 SubjectNamespace : definition .OrgNamespace ,
247247 Role : model.Role {
@@ -260,7 +260,7 @@ func (s Service) AddTeamToResource(ctx context.Context, team model.Group, resour
260260
261261 rel := model.Relation {
262262 ObjectNamespace : resourceNS ,
263- ObjectId : resource .Id ,
263+ ObjectId : resource .Idxa ,
264264 SubjectId : team .Id ,
265265 SubjectNamespace : definition .TeamNamespace ,
266266 Role : model.Role {
@@ -279,7 +279,7 @@ func (s Service) CheckPermission(ctx context.Context, user model.User, resource
279279
280280 rel := model.Relation {
281281 ObjectNamespace : resourceNS ,
282- ObjectId : resource .Id ,
282+ ObjectId : resource .Idxa ,
283283 SubjectId : user .Id ,
284284 SubjectNamespace : definition .UserNamespace ,
285285 }
@@ -307,7 +307,7 @@ func (s Service) AddOwnerToResource(ctx context.Context, user model.User, resour
307307
308308 rel := model.Relation {
309309 ObjectNamespace : resourceNS ,
310- ObjectId : resource .Id ,
310+ ObjectId : resource .Idxa ,
311311 SubjectId : user .Id ,
312312 SubjectNamespace : definition .UserNamespace ,
313313 Role : role ,
0 commit comments