only use blocked date and no published date for blocking;
allow any date to be selected as block date - not only the end of the month
This commit is contained in:
@ -85,5 +85,10 @@ export async function serverSideAuth({ req, allowedRoles }) {
|
||||
// Static method to check if the user has a specific role
|
||||
ProtectedRoute.IsInRole = async (roleName) => {
|
||||
const session = await getSession();
|
||||
return session && session.user && session.user.role === roleName;
|
||||
};
|
||||
return (session && session.user && session.user.role === roleName) || false;
|
||||
};
|
||||
|
||||
ProtectedRoute.GetCurrentUserId = async () => {
|
||||
const session = await getSession();
|
||||
return session && session.user && session.user.id;
|
||||
}
|
Reference in New Issue
Block a user