Skip to content

Commit

Permalink
fixed the role issue
Browse files Browse the repository at this point in the history
  • Loading branch information
vsumit89 committed Sep 2, 2022
1 parent 33db7a8 commit 495660c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func delete(w http.ResponseWriter, r *http.Request) {
errorx.Render(w, errorx.Parser(errorx.InvalidID()))
return
}

sID := chi.URLParam(r, "space_id")
spaceID, err := strconv.Atoi(sID)
if err != nil {
Expand Down Expand Up @@ -149,7 +149,7 @@ func delete(w http.ResponseWriter, r *http.Request) {
tuple := &model.KetoRelationTupleWithSubjectID{
KetoSubjectSet: model.KetoSubjectSet{
Namespace: namespace,
Object: fmt.Sprintf("roles:org:%d:app:%d", orgID, appID),
Object: fmt.Sprintf("roles:org:%d:app:%d:space:%d", orgID, appID, spaceID),
Relation: spaceRole.Name,
},
SubjectID: fmt.Sprintf("%d", delUserID),
Expand Down

0 comments on commit 495660c

Please sign in to comment.