Skip to content
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

fix: fixed getting users by only email, phone or userId without owner #96

Closed
wants to merge 2 commits into from
Closed

Conversation

o-richard
Copy link

Hello,

When I was testing the different ways to obtain a single user, I figured out that the owner was being passed into the request. This caused the responses to be HTML error pages by Beego.

According to the PR, the owner does not need to be passed in.

I removed the owner parameter and added the accompanying tests

@casbin-bot
Copy link

@tangyang9464 @imp2002 please review

@CLAassistant
Copy link

CLAassistant commented Jan 9, 2024

CLA assistant check
All committers have signed the CLA.

@hsluoyz
Copy link
Member

hsluoyz commented Jan 10, 2024

@o-richard failed

image

@o-richard
Copy link
Author

Regarding the TestApplication failed test, even though the deletion was successful, an error is returned if you try to recover a deleted application.
`


casdoor_demo:runtime error: invalid memory address or nil pointer dereference

Stack
C:/Program Files/Go/src/runtime/panic.go:914
C:/Program Files/Go/src/runtime/panic.go:261
C:/Program Files/Go/src/runtime/signal_windows.go:364
C:/github_repos/c_d/controllers/application.go:114
C:/Program Files/Go/src/reflect/value.go:596
C:/Program Files/Go/src/reflect/value.go:380
C:/GoPath/pkg/mod/github.com/beego/[email protected]/router.go:897
C:/Program Files/Go/src/net/http/server.go:2938
C:/Program Files/Go/src/net/http/server.go:2009
C:/Program Files/Go/src/runtime/asm_amd64.s:1650
`

@hsluoyz
Copy link
Member

hsluoyz commented Jan 10, 2024

@o-richard the go test is passing now. This is expected.

Owner is a supported optional parameter for the API. There's nothing to change here.

If you want to use other parameter combinations for the API, that's fine. But we will not add it to this test set.

If you don't know why you get error about the API usage, just show the error and create issue at Casdoor repo. Don't first mess up with the Go SDK for now.

image

@hsluoyz hsluoyz closed this Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants