-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert "backports changes back to feature-rebac (#1003)" #1030
Revert "backports changes back to feature-rebac (#1003)" #1030
Conversation
I thought we will just change the call from the old method to the new method that we already had. |
@mina1460 So I tried just changing the call, but the OpenFGA method for retrieving the list of models a user has access to only returns a list of UUID so I thought it would be better to just revert the entire commit. But thinking about it, maybe I should just grab all the models and then do things similar to the way it was before. |
edc6952
to
fb64886
Compare
@mina1460 I've switched it as I realised it's probably better to get all the models first, ptal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good to me reverting
@ale8k sorry the original description is misleading, if you read the follow-up comments you'll see I discussed with Mina and changed it not to be a simple revert. |
code looks good, but there are some failing tests |
models[i] = m.Model_ | ||
// UUIDs are returned in the form "model:uuid" | ||
for i, uuid := range modelUUIDs { | ||
modelUUIDs[i] = strings.Split(uuid, ":")[1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strings.Split bit assumes we will never change the format.. which might be ok.. also assumes there will be a :
in the string..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps we need a function that will split the tag type from the value in jaas tags...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can add
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to do this in a follow up PR, I believe we should be returning ofga entities from ofga related queries, not strings. Then we won't have this parsing problem.
Description
Reverts #1003 the backport introduced a regression where we query Postgres for user access to models instead of OpenFGA. I think the best way forward is simply to revert the commit, which is all this PR does.
Fixes CSS-5254
Engineering checklist
Check only items that apply