mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 11:20:18 +08:00
feat: add organization context select box for admin (#2013)
* feat: organization as context * feat: organization as context with backend filtration * Update app.conf * update app.conf and hide organization select for mobile. --------- Co-authored-by: dplynsky <dplynsky@ptsecurity.com> Co-authored-by: hsluoyz <hsluoyz@qq.com>
This commit is contained in:
@ -37,6 +37,7 @@ func (c *ApiController) GetOrganizations() {
|
||||
value := c.Input().Get("value")
|
||||
sortField := c.Input().Get("sortField")
|
||||
sortOrder := c.Input().Get("sortOrder")
|
||||
organizationName := c.Input().Get("organizationName")
|
||||
|
||||
isGlobalAdmin := c.IsGlobalAdmin()
|
||||
if limit == "" || page == "" {
|
||||
@ -73,7 +74,7 @@ func (c *ApiController) GetOrganizations() {
|
||||
}
|
||||
|
||||
paginator := pagination.SetPaginator(c.Ctx, limit, count)
|
||||
organizations, err := object.GetMaskedOrganizations(object.GetPaginationOrganizations(owner, paginator.Offset(), limit, field, value, sortField, sortOrder))
|
||||
organizations, err := object.GetMaskedOrganizations(object.GetPaginationOrganizations(owner, organizationName, paginator.Offset(), limit, field, value, sortField, sortOrder))
|
||||
if err != nil {
|
||||
c.ResponseError(err.Error())
|
||||
return
|
||||
|
Reference in New Issue
Block a user