Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Return unauthorized error if the ACL check finds the current user is deactivated
天舟7bdcb5ef9238
diff --git a/server/acl.go b/server/acl.goindex cce0c538dc..55256e700e 100644--- a/server/acl.go+++ b/server/acl.go@@ -49,6 +49,9 @@ func ACLMiddleware(l *zap.Logger, s *Server, ce *casbin.Enforcer, next echo.Hand}return echo.NewHTTPError(http.StatusInternalServerError, "Failed to process authorize request.").SetInternal(err)}+ if member.RowStatus == api.Archived {+ return echo.NewHTTPError(http.StatusUnauthorized, "This user has been deactivated by the admin")+ }// If the requests is trying to PATCH/DELETE herself, we will change the method signature to// XXX_SELF so that the policy can differentiate between XXX and XXX_SELF