Compare commits

..

2 Commits

2 changed files with 4 additions and 2 deletions

View File

@ -313,8 +313,9 @@ func CheckAccessPermission(userId string, application *Application) (bool, error
return true, err return true, err
} }
enforcer := getEnforcer(permission) enforcer := getEnforcer(permission)
allowed, err = enforcer.Enforce(userId, application.Name, "read") if allowed, err = enforcer.Enforce(userId, application.Name, "read"); allowed {
break return allowed, err
}
} }
} }
return allowed, err return allowed, err

View File

@ -96,6 +96,7 @@ class LoginPage extends React.Component {
AuthBackend.getApplicationLogin(oAuthParams) AuthBackend.getApplicationLogin(oAuthParams)
.then((res) => { .then((res) => {
if (res.status === "ok") { if (res.status === "ok") {
this.onUpdateApplication(res.data);
this.setState({ this.setState({
application: res.data, application: res.data,
}); });