Skip to content

Commit 162c053

Browse files
committed
fix lint
1 parent 82082c4 commit 162c053

2 files changed

Lines changed: 7 additions & 16 deletions

File tree

forge/ee/lib/sso/index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,6 @@ module.exports.init = async function (app) {
441441
const desiredTeamMemberships = {}
442442
const groupRegEx = /^ff-(.+)-([^-]+)$/
443443
for (const i in searchEntries) {
444-
445444
const match = groupRegEx.exec(searchEntries[i].cn)
446445
if (match) {
447446
app.log.debug(`Found group ${searchEntries[i].cn} for user ${user.username}`)
@@ -533,10 +532,10 @@ module.exports.init = async function (app) {
533532
}
534533
}
535534
// - Check remaining desired memberships
536-
// - create membership
537-
for (const [teamSlug, teamRole] of Object.entries(desiredTeamMemberships)) {
538-
// This is a new team membership
539-
promises.push(app.db.models.Team.bySlug(teamSlug).then(team => {
535+
// - create membership
536+
for (const [teamSlug, teamRole] of Object.entries(desiredTeamMemberships)) {
537+
// This is a new team membership
538+
promises.push(app.db.models.Team.bySlug(teamSlug).then(team => {
540539
if (team) {
541540
// console.log(`adding to team ${teamSlug} role ${teamRole}`)
542541
return app.db.controllers.Team.addUser(team, user, teamRole).then(() => {

frontend/src/pages/admin/Settings/SSO/createEditProvider.vue

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,10 @@ export default {
214214
return this.$route.params.id === 'create'
215215
},
216216
isGroupOptionsValid () {
217-
try {
218217
return !this.input.options.groupMapping || (
219-
(this.input.options.type === 'saml' ? this.isGroupAssertionNameValid : this.isGroupsDNValid)
220-
&& this.isGroupAdminNameValid
218+
(this.input.options.type === 'saml' ? this.isGroupAssertionNameValid : this.isGroupsDNValid) &&
219+
this.isGroupAdminNameValid
221220
)
222-
} catch (eee) {
223-
console.log(eee)
224-
}
225221
},
226222
isGroupAssertionNameValid () {
227223
return this.input.options.groupAssertionName && this.input.options.groupAssertionName.length > 0
@@ -236,11 +232,7 @@ export default {
236232
return !this.isGroupsDNValid ? 'Group DN is required' : ''
237233
},
238234
isGroupAdminNameValid () {
239-
try {
240-
return !this.input.options.groupAdmin || (this.input.options.groupAdminName && this.input.options.groupAdminName.length > 0)
241-
} catch (eee) {
242-
console.log(eee)
243-
}
235+
return !this.input.options.groupAdmin || (this.input.options.groupAdminName && this.input.options.groupAdminName.length > 0)
244236
},
245237
groupAdminNameError () {
246238
return !this.isGroupAdminNameValid ? 'Admin Group name is required' : ''

0 commit comments

Comments
 (0)