mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 11:20:18 +08:00
refactor: optimize the code to getEnforcer (#2120)
This commit is contained in:
@ -161,5 +161,8 @@ func modelChangeTrigger(oldName string, newName string) error {
|
||||
}
|
||||
|
||||
func HasRoleDefinition(m model.Model) bool {
|
||||
if m == nil {
|
||||
return false
|
||||
}
|
||||
return m["g"] != nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user