mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
fix(server): premissions guard for read and write endpoints
This commit is contained in:
@@ -43,11 +43,11 @@ export class InactivateUserService {
|
||||
// Throw serivce error if the user is already inactivated.
|
||||
this.throwErrorIfUserInactive(tenantUser);
|
||||
|
||||
// Marks the tenant user as active.
|
||||
// Marks the tenant user as inactive.
|
||||
await this.tenantUserModel()
|
||||
.query()
|
||||
.findById(userId)
|
||||
.update({ active: true });
|
||||
.update({ active: false });
|
||||
|
||||
// Triggers `onTenantUserActivated` event.
|
||||
await this.eventEmitter.emitAsync(events.tenantUser.onInactivated, {
|
||||
|
||||
Reference in New Issue
Block a user