@solidstarters/solid-core 1.2.171 → 1.2.173
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/controllers/otp-authentication.controller.js.map +1 -1
- package/dist/services/user.service.d.ts +2 -1
- package/dist/services/user.service.d.ts.map +1 -1
- package/dist/services/user.service.js +8 -5
- package/dist/services/user.service.js.map +1 -1
- package/dist/solid-core.module.js +0 -2
- package/dist/solid-core.module.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/controllers/otp-authentication.controller.ts +1 -1
- package/src/services/user.service.ts +4 -2
- package/src/solid-core.module.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solidstarters/solid-core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.173",
|
|
4
4
|
"description": "This module is a NestJS module containing all the required core providers required by a Solid application",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -8,7 +8,7 @@ import { OTPSignInDto } from '../dtos/otp-sign-in.dto';
|
|
|
8
8
|
import { OTPSignUpDto } from '../dtos/otp-sign-up.dto';
|
|
9
9
|
import { AuthType } from '../enums/auth-type.enum';
|
|
10
10
|
import { AuthenticationService } from '../services/authentication.service';
|
|
11
|
-
import { ThrottlerGuard, SkipThrottle } from '@nestjs/throttler';
|
|
11
|
+
// import { ThrottlerGuard, SkipThrottle } from '@nestjs/throttler';
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
@Auth(AuthType.None)
|
|
@@ -31,6 +31,8 @@ export class UserService extends CRUDService<User> {
|
|
|
31
31
|
readonly entityManager: EntityManager,
|
|
32
32
|
// @InjectRepository(User, 'default')
|
|
33
33
|
readonly repo: UserRepository,
|
|
34
|
+
@InjectRepository(User, 'default')
|
|
35
|
+
readonly nonSecurityRuleAwareRepo : Repository<User>,
|
|
34
36
|
@InjectRepository(RoleMetadata)
|
|
35
37
|
private readonly roleRepository: Repository<RoleMetadata>,
|
|
36
38
|
readonly moduleRef: ModuleRef,
|
|
@@ -141,7 +143,7 @@ export class UserService extends CRUDService<User> {
|
|
|
141
143
|
}
|
|
142
144
|
|
|
143
145
|
async addRolesToUser(username: string, roleNames: string[]): Promise<User> {
|
|
144
|
-
const user = await this.
|
|
146
|
+
const user = await this.nonSecurityRuleAwareRepo.findOne({
|
|
145
147
|
where: { username: username },
|
|
146
148
|
relations: { roles: true }
|
|
147
149
|
});
|
|
@@ -174,7 +176,7 @@ export class UserService extends CRUDService<User> {
|
|
|
174
176
|
user.roles = user.roles.filter(role => !rolesToRemove.includes(role));
|
|
175
177
|
}
|
|
176
178
|
|
|
177
|
-
return await this.
|
|
179
|
+
return await this.nonSecurityRuleAwareRepo.save(user);
|
|
178
180
|
}
|
|
179
181
|
|
|
180
182
|
|
package/src/solid-core.module.ts
CHANGED
|
@@ -188,7 +188,7 @@ import { TwilioSmsQueuePublisherDatabase } from './jobs/database/twilio-sms-publ
|
|
|
188
188
|
import { TwilioSmsQueueSubscriberDatabase } from './jobs/database/twilio-sms-subscriber-database.service';
|
|
189
189
|
|
|
190
190
|
|
|
191
|
-
import { ThrottlerModule } from '@nestjs/throttler';
|
|
191
|
+
// import { ThrottlerModule } from '@nestjs/throttler';
|
|
192
192
|
import { IngestCommand } from './commands/ingest.command';
|
|
193
193
|
import { MailFactory } from './factories/mail.factory';
|
|
194
194
|
import { ErrorMapperService } from './helpers/error-mapper.service';
|
|
@@ -689,7 +689,7 @@ import { ViewMetadataSubsciber } from './subscribers/view-metadata.subscriber';
|
|
|
689
689
|
MailFactory,
|
|
690
690
|
PollerService,
|
|
691
691
|
AiInteractionService,
|
|
692
|
-
ThrottlerModule,
|
|
692
|
+
// ThrottlerModule,
|
|
693
693
|
],
|
|
694
694
|
})
|
|
695
695
|
export class SolidCoreModule { }
|