- Updated the isSuperUser function to only check for ADMIN role. - Added SQL migration scripts for MySQL, PostgreSQL, and SQLite to change user roles from HOST to ADMIN. - Created a new SQLite migration to alter the user table structure and ensure data integrity during the migration process.
5 lines
181 B
TypeScript
5 lines
181 B
TypeScript
import { User, User_Role } from "@/types/proto/api/v1/user_service_pb";
|
|
|
|
export const isSuperUser = (user: User | undefined) => {
|
|
return user && user.role === User_Role.ADMIN;
|
|
};
|