@rufous/aem 1.1.54 → 1.1.56
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/build/middlewares/require-company-employee-auth.js +2 -1
- package/build/middlewares/require-company-or-candidate-auth.js +2 -1
- package/build/middlewares/require-partner-candidate-auth.js +2 -1
- package/build/middlewares/require-partner-employee-auth.js +2 -1
- package/build/middlewares/require-partner-or-candidate-auth.js +2 -1
- package/build/middlewares/require-superadmin-or-company-auth.js +2 -1
- package/build/middlewares/require-superadmin-or-partner-auth.js +2 -1
- package/package.json +1 -1
|
@@ -14,7 +14,8 @@ exports.requireCompanyEmployeeAuth = function (req, res, next) {
|
|
|
14
14
|
if (req.currentUser.uty != user_type_1.UserType.CompanyEmployee
|
|
15
15
|
&& req.currentUser.uty != user_type_1.UserType.CompanyEmployeeManager
|
|
16
16
|
&& req.currentUser.uty != user_type_1.UserType.CompanyManager
|
|
17
|
-
&& req.currentUser.uty != user_type_1.UserType.CompanySuperuser
|
|
17
|
+
&& req.currentUser.uty != user_type_1.UserType.CompanySuperuser
|
|
18
|
+
&& req.currentUser.uty != user_type_1.UserType.CompanyUser) {
|
|
18
19
|
throw new not_authorized_error_1.NotAuthorizedError();
|
|
19
20
|
}
|
|
20
21
|
next();
|
|
@@ -15,7 +15,8 @@ exports.requireCompanyOrCandidateAuth = function (req, res, next) {
|
|
|
15
15
|
&& req.currentUser.uty != user_type_1.UserType.CompanyEmployee
|
|
16
16
|
&& req.currentUser.uty != user_type_1.UserType.CompanySuperuser
|
|
17
17
|
&& req.currentUser.uty != user_type_1.UserType.CompanyEmployeeManager
|
|
18
|
-
&& req.currentUser.uty != user_type_1.UserType.CompanyManager
|
|
18
|
+
&& req.currentUser.uty != user_type_1.UserType.CompanyManager
|
|
19
|
+
&& req.currentUser.uty != user_type_1.UserType.CompanyUser) {
|
|
19
20
|
throw new not_authorized_error_1.NotAuthorizedError();
|
|
20
21
|
}
|
|
21
22
|
next();
|
|
@@ -15,7 +15,8 @@ exports.requirePartnerCandidateAuth = function (req, res, next) {
|
|
|
15
15
|
&& req.currentUser.uty != user_type_1.UserType.PartnerEmployeeManager
|
|
16
16
|
&& req.currentUser.uty != user_type_1.UserType.PartnerManager
|
|
17
17
|
&& req.currentUser.uty != user_type_1.UserType.Candidate
|
|
18
|
-
&& req.currentUser.uty != user_type_1.UserType.PartnerSuperuser
|
|
18
|
+
&& req.currentUser.uty != user_type_1.UserType.PartnerSuperuser
|
|
19
|
+
&& req.currentUser.uty != user_type_1.UserType.PartnerUser) {
|
|
19
20
|
throw new not_authorized_error_1.NotAuthorizedError();
|
|
20
21
|
}
|
|
21
22
|
next();
|
|
@@ -14,7 +14,8 @@ exports.requirePartnerEmployeeAuth = function (req, res, next) {
|
|
|
14
14
|
if (req.currentUser.uty != user_type_1.UserType.PartnerEmployee
|
|
15
15
|
&& req.currentUser.uty != user_type_1.UserType.PartnerEmployeeManager
|
|
16
16
|
&& req.currentUser.uty != user_type_1.UserType.PartnerManager
|
|
17
|
-
&& req.currentUser.uty != user_type_1.UserType.PartnerSuperuser
|
|
17
|
+
&& req.currentUser.uty != user_type_1.UserType.PartnerSuperuser
|
|
18
|
+
&& req.currentUser.uty != user_type_1.UserType.PartnerUser) {
|
|
18
19
|
throw new not_authorized_error_1.NotAuthorizedError();
|
|
19
20
|
}
|
|
20
21
|
next();
|
|
@@ -16,7 +16,8 @@ exports.requirePartnerOrCandidateAuth = function (req, res, next) {
|
|
|
16
16
|
&& req.currentUser.uty != user_type_1.UserType.PartnerEmployee
|
|
17
17
|
&& req.currentUser.uty != user_type_1.UserType.PartnerEmployeeManager
|
|
18
18
|
&& req.currentUser.uty != user_type_1.UserType.PartnerManager
|
|
19
|
-
&& req.currentUser.uty != user_type_1.UserType.PartnerSuperuser
|
|
19
|
+
&& req.currentUser.uty != user_type_1.UserType.PartnerSuperuser
|
|
20
|
+
&& req.currentUser.uty != user_type_1.UserType.PartnerUser) {
|
|
20
21
|
throw new not_authorized_error_1.NotAuthorizedError();
|
|
21
22
|
}
|
|
22
23
|
next();
|
|
@@ -16,7 +16,8 @@ exports.requireSuperAdminOrCompanyAuth = function (req, res, next) {
|
|
|
16
16
|
&& req.currentUser.uty != user_type_1.UserType.CompanyEmployee
|
|
17
17
|
&& req.currentUser.uty != user_type_1.UserType.CompanySuperuser
|
|
18
18
|
&& req.currentUser.uty != user_type_1.UserType.CompanyEmployeeManager
|
|
19
|
-
&& req.currentUser.uty != user_type_1.UserType.CompanyManager
|
|
19
|
+
&& req.currentUser.uty != user_type_1.UserType.CompanyManager
|
|
20
|
+
&& req.currentUser.uty != user_type_1.UserType.CompanyUser) {
|
|
20
21
|
throw new not_authorized_error_1.NotAuthorizedError();
|
|
21
22
|
}
|
|
22
23
|
next();
|
|
@@ -17,7 +17,8 @@ exports.requireSuperAdminOrPartnerAuth = function (req, res, next) {
|
|
|
17
17
|
&& req.currentUser.uty != user_type_1.UserType.PartnerEmployee
|
|
18
18
|
&& req.currentUser.uty != user_type_1.UserType.PartnerEmployeeManager
|
|
19
19
|
&& req.currentUser.uty != user_type_1.UserType.PartnerManager
|
|
20
|
-
&& req.currentUser.uty != user_type_1.UserType.PartnerSuperuser
|
|
20
|
+
&& req.currentUser.uty != user_type_1.UserType.PartnerSuperuser
|
|
21
|
+
&& req.currentUser.uty != user_type_1.UserType.PartnerUser) {
|
|
21
22
|
throw new not_authorized_error_1.NotAuthorizedError();
|
|
22
23
|
}
|
|
23
24
|
next();
|