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

[feature] How to get group tree with casdoor-nodejs-sdk? #53

Closed
radiorz opened this issue Mar 27, 2024 · 3 comments
Closed

[feature] How to get group tree with casdoor-nodejs-sdk? #53

radiorz opened this issue Mar 27, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@radiorz
Copy link

radiorz commented Mar 27, 2024

The group tree means this part: https://door.casdoor.com/trees/built-in

image

The group tree mainly relies on the data returned by the get-groups API. But the returned data is a list. The Casdoor frontend code will build the tree from the list. We may need to do so too. There are two ways:

  1. Build the tree in Casdoor Go backend: https://github.com/casdoor/casdoor/blob/master/controllers/group.go#L31
  2. Build the tree in the SDK (like this casdoor-java-sdk)

image

@casbin-bot
Copy link

@casbin-bot casbin-bot added the question Further information is requested label Mar 27, 2024
@radiorz radiorz changed the title How to get group tree with casdoor-nodejs-sdk? [question]How to get group tree with casdoor-nodejs-sdk? Mar 27, 2024
@hsluoyz hsluoyz added enhancement New feature or request and removed question Further information is requested labels Apr 11, 2024
@hsluoyz hsluoyz changed the title [question]How to get group tree with casdoor-nodejs-sdk? [feature] How to get group tree with casdoor-nodejs-sdk? Apr 11, 2024
@hsluoyz
Copy link
Member

hsluoyz commented Apr 21, 2024

Fixed by: 02c17eb

@hsluoyz hsluoyz closed this as completed Apr 21, 2024
@hsluoyz
Copy link
Member

hsluoyz commented Apr 21, 2024

@radiorz use the new API: getGroups(withTree?: boolean)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants