mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 19:40:19 +08:00
Add GetDirectResources()
This commit is contained in:
@ -145,6 +145,14 @@ func (c *ApiController) IsMaskedEnabled() (bool, bool) {
|
||||
|
||||
func (c *ApiController) GetProviderFromContext(category string) (*object.Provider, error) {
|
||||
providerName := c.Input().Get("provider")
|
||||
if providerName == "" {
|
||||
field := c.Input().Get("field")
|
||||
value := c.Input().Get("value")
|
||||
if field == "provider" && value != "" {
|
||||
providerName = value
|
||||
}
|
||||
}
|
||||
|
||||
if providerName != "" {
|
||||
provider, err := object.GetProvider(util.GetId("admin", providerName))
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user