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 get user profile url #61

Closed

Conversation

elierotenberg
Copy link
Contributor

This PR removes the incorrect } at the end of the generated profile URL when access token is provided, as well as makes accessToken explicitly optional (typings only, no runtime impact).

Previous implementation always used this.orgName
for the required owner field, however the expected
owner can be a user name, and not an org name[1].
For example, the Casdoor web app always sets the
owner to "admin" [2]. This in turns make it
impossible to retrieve syncers created through the
web app using the SDK.

This addition fixes this issue by adding an optional
owner parameter to the syncer methods.

[1]: https://github.com/casdoor/casdoor/blob/master/object/syncer.go#L71
[2]: https://github.com/casdoor/casdoor/blob/master/web/src/SyncerListPage.js#L30
@casbin-bot
Copy link

@tangyang9464 @imp2002 please review

@elierotenberg
Copy link
Contributor Author

Sorry, wrong commits. Opening a new one.

@elierotenberg elierotenberg deleted the fix-get-user-profile-url branch June 6, 2024 14:35
@elierotenberg elierotenberg restored the fix-get-user-profile-url branch June 6, 2024 14:39
@elierotenberg elierotenberg deleted the fix-get-user-profile-url branch June 6, 2024 14:40
@hsluoyz
Copy link
Member

hsluoyz commented Jun 6, 2024

Replaced by: #62

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.

3 participants