Răsfoiți Sursa

Use configurable user domain for logging in

Sergiu Miclea 7 ani în urmă
părinte
comite
ed45037278
2 a modificat fișierele cu 4 adăugiri și 2 ștergeri
  1. 2 0
      src/config.js
  2. 2 2
      src/sources/UserSource.js

+ 2 - 0
src/config.js

@@ -27,6 +27,8 @@ export const servicesUrl = {
   openId: `${coriolisUrl}identity/OS-FEDERATION/identity_providers/google/protocols/openid/auth`,
 }
 
+export const userDomain = 'default'
+
 export const useSecret = true // use secret_ref when creating and endpoint
 
 export const navigationMenu = [

+ 2 - 2
src/sources/UserSource.js

@@ -17,7 +17,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 import cookie from 'js-cookie'
 
 import Api from '../utils/ApiCaller'
-import { servicesUrl, coriolisUrl } from '../config'
+import { servicesUrl, coriolisUrl, userDomain } from '../config'
 import type { Credentials, User } from '../types/User'
 import type { Role, Project, RoleAssignment } from '../types/Project'
 
@@ -43,7 +43,7 @@ class UserSource {
           password: {
             user: {
               name: userData.name,
-              domain: { name: 'default' },
+              domain: { name: userDomain },
               password: userData.password,
             },
           },