File tree Expand file tree Collapse file tree
frontend/src/pages/admin/Settings/SSO Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -441,7 +441,6 @@ module.exports.init = async function (app) {
441441 const desiredTeamMemberships = { }
442442 const groupRegEx = / ^ f f - ( .+ ) - ( [ ^ - ] + ) $ /
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 ( ( ) => {
Original file line number Diff line number Diff 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' : ' '
You can’t perform that action at this time.
0 commit comments