isSystem: false
This commit is contained in:
@@ -39,6 +39,7 @@ export class RolesService {
|
||||
const role = this.roleRepository.create({
|
||||
name,
|
||||
restaurant,
|
||||
isSystem: false,
|
||||
});
|
||||
|
||||
// Add permissions if provided
|
||||
@@ -60,7 +61,7 @@ export class RolesService {
|
||||
}
|
||||
|
||||
async findAllGeneralAndRestaurantRoles(restId: string) {
|
||||
const where: FilterQuery<Role> = { $or: [{ restaurant: restId }, { restaurant: null }] };
|
||||
const where: FilterQuery<Role> = { $or: [{ restaurant: restId }, { restaurant: null }], isSystem: false };
|
||||
|
||||
const roles = await this.roleRepository.find(where, {
|
||||
orderBy: { createdAt: 'desc' },
|
||||
|
||||
Reference in New Issue
Block a user