refactor: rename role.options -> role.policies

This commit is contained in:
syuilo
2023-01-15 20:52:53 +09:00
parent 518b3e2f73
commit 81f11d8f86
53 changed files with 254 additions and 232 deletions

View File

@@ -479,8 +479,8 @@ export class DriveService {
if (user && !isLink) {
const usage = await this.driveFileEntityService.calcDriveUsageOf(user);
const role = await this.roleService.getUserRoleOptions(user.id);
const driveCapacity = 1024 * 1024 * role.driveCapacityMb;
const policies = await this.roleService.getUserPolicies(user.id);
const driveCapacity = 1024 * 1024 * policies.driveCapacityMb;
this.registerLogger.debug('drive capacity override applied');
this.registerLogger.debug(`overrideCap: ${driveCapacity}bytes, usage: ${usage}bytes, u+s: ${usage + info.size}bytes`);