summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/DriveService.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-01-15 20:52:53 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-01-15 20:52:53 +0900
commit81f11d8f860803cf01fbb2cfd106bd3344db98f2 (patch)
tree2d5c528a5e6a24e016c74d49a650e76096b6f935 /packages/backend/src/core/DriveService.ts
parentロールの各オプションに優先度を設定できるように (diff)
downloadsharkey-81f11d8f860803cf01fbb2cfd106bd3344db98f2.tar.gz
sharkey-81f11d8f860803cf01fbb2cfd106bd3344db98f2.tar.bz2
sharkey-81f11d8f860803cf01fbb2cfd106bd3344db98f2.zip
refactor: rename role.options -> role.policies
Diffstat (limited to 'packages/backend/src/core/DriveService.ts')
-rw-r--r--packages/backend/src/core/DriveService.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/backend/src/core/DriveService.ts b/packages/backend/src/core/DriveService.ts
index 9002c96a65..598a457e83 100644
--- a/packages/backend/src/core/DriveService.ts
+++ b/packages/backend/src/core/DriveService.ts
@@ -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`);