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

feat: add the ability to use the application for several organizations #2846

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

waffle-frame
Copy link
Contributor

Ref #2821

@casbin-bot
Copy link
Contributor

@tangyang9464 @imp2002 please review

@dacongda
Copy link
Contributor

dacongda commented Apr 9, 2024

err := ormer.Engine.Desc("created_time").Find(&applications, &Application{Organization: organization})

maybe it is better to add a where clause in this query to find public application?

@waffle-frame
Copy link
Contributor Author

err := ormer.Engine.Desc("created_time").Find(&applications, &Application{Organization: organization})

может быть, лучше добавить в этот запрос предложениеwhere, чтобы найти общедоступное применение?

Yes, you are right, good point
What do you think about the implementation?

@dacongda
Copy link
Contributor

dacongda commented Apr 9, 2024

if you mean the implementation of where clause, you can refer to

err := ormer.Engine.Where("owner = ? or owner = ? ", "admin", owner).Desc("created_time").Find(&providers, &Provider{})

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.

None yet

3 participants