more profileConfig rename
This commit is contained in:
@@ -26,10 +26,10 @@ const assert = require('assert'),
|
||||
async function authorize(req, res, next) {
|
||||
assert.strictEqual(typeof req.user, 'object');
|
||||
|
||||
const [error, directoryConfig] = await safe(settings.getDirectoryConfig());
|
||||
const [error, profileConfig] = await safe(settings.getProfileConfig());
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
if (directoryConfig.lockUserProfiles) return next(new HttpError(403, 'admin has disallowed users from editing profiles'));
|
||||
if (profileConfig.lockUserProfiles) return next(new HttpError(403, 'admin has disallowed users from editing profiles'));
|
||||
|
||||
next();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user