Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Website
Commits
c421f54e
Commit
c421f54e
authored
Mar 07, 2019
by
Oleksii Savran
Browse files
Merge branch '241-login-redirects' into 'master'
Login redirects Closes
#241
See merge request genesys-pgr/genesys-ui!247
parents
8c2204de
bc3ae23e
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/datasets/routes.ts
View file @
c421f54e
...
...
@@ -2,7 +2,7 @@ import Loadable from 'utilities/CustomReactLoadable';
import
steps
from
'
datasets/ui/dashboard/dataset-stepper/steps
'
;
import
{
ROLE_ADMINISTRATOR
,
ROLE_USER
}
from
'
constants/userRoles
'
;
import
{
ROLE_ADMINISTRATOR
,
ROLE_
VETTED
USER
}
from
'
constants/userRoles
'
;
const
publicRoutes
=
[
{
...
...
@@ -48,7 +48,7 @@ const dashboardRoutes = [
loader
:
()
=>
import
(
/* webpackMode:"lazy", webpackChunkName: "datasets" */
'
datasets/ui/dashboard/DashboardPage
'
),
}),
exact
:
true
,
auth
:
[
ROLE_USER
,
ROLE_ADMINISTRATOR
],
auth
:
[
ROLE_
VETTED
USER
,
ROLE_ADMINISTRATOR
],
extraProps
:
{
title
:
'
My Dashboard
'
,
},
...
...
@@ -58,7 +58,7 @@ const dashboardRoutes = [
component
:
Loadable
({
loader
:
()
=>
import
(
/* webpackMode:"lazy", webpackChunkName: "datasets" */
'
datasets/ui/dashboard/StepperPage
'
),
}),
auth
:
[
ROLE_USER
,
ROLE_ADMINISTRATOR
],
auth
:
[
ROLE_
VETTED
USER
,
ROLE_ADMINISTRATOR
],
extraProps
:
{
title
:
'
datasets.dashboard.p.stepper.publisher
'
,
},
...
...
@@ -77,7 +77,7 @@ const dashboardRoutes = [
component
:
Loadable
({
loader
:
()
=>
import
(
/* webpackMode:"lazy", webpackChunkName: "datasets" */
'
datasets/ui/dashboard/StepperPage
'
),
}),
auth
:
[
ROLE_USER
,
ROLE_ADMINISTRATOR
],
auth
:
[
ROLE_
VETTED
USER
,
ROLE_ADMINISTRATOR
],
extraProps
:
{
title
:
'
datasets.dashboard.p.stepper.publisher
'
,
},
...
...
src/descriptorlists/routes.ts
View file @
c421f54e
...
...
@@ -2,7 +2,7 @@ import Loadable from 'utilities/CustomReactLoadable';
import
steps
from
'
descriptorlists/ui/dashboard/descriptorlist-stepper/steps
'
;
import
{
ROLE_ADMINISTRATOR
,
ROLE_USER
}
from
'
constants/userRoles
'
;
import
{
ROLE_ADMINISTRATOR
,
ROLE_
VETTED
USER
}
from
'
constants/userRoles
'
;
const
publicRoutes
=
[
...
...
@@ -37,7 +37,7 @@ const dashboardRoutes = [
component
:
Loadable
({
loader
:
()
=>
import
(
/* webpackMode:"lazy", webpackChunkName: "descriptorlists" */
'
descriptorlists/ui/dashboard/DashboardPage
'
),
}),
auth
:
[
ROLE_USER
,
ROLE_ADMINISTRATOR
],
auth
:
[
ROLE_
VETTED
USER
,
ROLE_ADMINISTRATOR
],
extraProps
:
{
title
:
'
My Dashboard
'
,
},
...
...
@@ -48,7 +48,7 @@ const dashboardRoutes = [
loader
:
()
=>
import
(
/* webpackMode:"lazy", webpackChunkName: "descriptorlists" */
'
descriptorlists/ui/dashboard/descriptorlist-stepper/StepperPage
'
),
}),
exact
:
true
,
auth
:
[
ROLE_USER
,
ROLE_ADMINISTRATOR
],
auth
:
[
ROLE_
VETTED
USER
,
ROLE_ADMINISTRATOR
],
extraProps
:
{
title
:
'
Descriptor list publisher
'
,
},
...
...
@@ -67,7 +67,7 @@ const dashboardRoutes = [
component
:
Loadable
({
loader
:
()
=>
import
(
/* webpackMode:"lazy", webpackChunkName: "descriptorlists" */
'
descriptorlists/ui/dashboard/descriptorlist-stepper/StepperPage
'
),
}),
auth
:
[
ROLE_USER
,
ROLE_ADMINISTRATOR
],
auth
:
[
ROLE_
VETTED
USER
,
ROLE_ADMINISTRATOR
],
extraProps
:
{
title
:
'
Descriptor list publisher
'
,
},
...
...
src/descriptors/routes.ts
View file @
c421f54e
import
Loadable
from
'
utilities/CustomReactLoadable
'
;
import
{
ROLE_ADMINISTRATOR
,
ROLE_USER
}
from
'
constants/userRoles
'
;
import
{
ROLE_ADMINISTRATOR
,
ROLE_
VETTED
USER
}
from
'
constants/userRoles
'
;
const
publicRoutes
=
[
...
...
@@ -35,7 +35,7 @@ const dashboardRoutes = [
loader
:
()
=>
import
(
/* webpackMode:"lazy", webpackChunkName: "descriptors" */
'
descriptors/ui/dashboard/DashboardPage
'
),
}),
exact
:
true
,
auth
:
[
ROLE_USER
,
ROLE_ADMINISTRATOR
],
auth
:
[
ROLE_
VETTED
USER
,
ROLE_ADMINISTRATOR
],
extraProps
:
{
title
:
'
My Dashboard
'
,
},
...
...
@@ -45,7 +45,7 @@ const dashboardRoutes = [
component
:
Loadable
({
loader
:
()
=>
import
(
/* webpackMode:"lazy", webpackChunkName: "descriptors" */
'
descriptors/ui/dashboard/EditPage
'
),
}),
auth
:
[
ROLE_USER
,
ROLE_ADMINISTRATOR
],
auth
:
[
ROLE_
VETTED
USER
,
ROLE_ADMINISTRATOR
],
exact
:
true
,
},
{
...
...
@@ -53,7 +53,7 @@ const dashboardRoutes = [
component
:
Loadable
({
loader
:
()
=>
import
(
/* webpackMode:"lazy", webpackChunkName: "descriptors" */
'
descriptors/ui/dashboard/EditPage
'
),
}),
auth
:
[
ROLE_USER
,
ROLE_ADMINISTRATOR
],
auth
:
[
ROLE_
VETTED
USER
,
ROLE_ADMINISTRATOR
],
exact
:
true
,
},
];
...
...
src/subsets/routes.ts
View file @
c421f54e
...
...
@@ -2,7 +2,7 @@ import Loadable from 'utilities/CustomReactLoadable';
import
steps
from
'
subsets/ui/dashboard/subset-stepper/steps
'
;
import
{
ROLE_ADMINISTRATOR
,
ROLE_USER
}
from
'
constants/userRoles
'
;
import
{
ROLE_ADMINISTRATOR
,
ROLE_
VETTED
USER
}
from
'
constants/userRoles
'
;
const
publicRoutes
=
[
{
...
...
@@ -35,7 +35,7 @@ const dashboardRoutes = [
component
:
Loadable
({
loader
:
()
=>
import
(
/* webpackMode:"lazy", webpackChunkName: "subsets" */
'
subsets/ui/dashboard/StepperPage
'
),
}),
auth
:
[
ROLE_USER
,
ROLE_ADMINISTRATOR
],
auth
:
[
ROLE_
VETTED
USER
,
ROLE_ADMINISTRATOR
],
extraProps
:
{
title
:
'
Subset create
'
,
},
...
...
@@ -54,7 +54,7 @@ const dashboardRoutes = [
component
:
Loadable
({
loader
:
()
=>
import
(
/* webpackMode:"lazy", webpackChunkName: "subsets" */
'
subsets/ui/dashboard/DashboardPage
'
),
}),
auth
:
[
ROLE_USER
,
ROLE_ADMINISTRATOR
],
auth
:
[
ROLE_
VETTED
USER
,
ROLE_ADMINISTRATOR
],
exact
:
true
,
extraProps
:
{
title
:
'
subsets.dashboard.p.stepper.publisher
'
,
...
...
@@ -65,7 +65,7 @@ const dashboardRoutes = [
component
:
Loadable
({
loader
:
()
=>
import
(
/* webpackMode:"lazy", webpackChunkName: "subsets" */
'
subsets/ui/dashboard/StepperPage
'
),
}),
auth
:
[
ROLE_USER
,
ROLE_ADMINISTRATOR
],
auth
:
[
ROLE_
VETTED
USER
,
ROLE_ADMINISTRATOR
],
extraProps
:
{
title
:
'
subsets.dashboard.p.stepper.publisher
'
,
},
...
...
src/ui/layout/DashboardLayout.tsx
View file @
c421f54e
...
...
@@ -3,6 +3,7 @@ import { translate } from 'react-i18next';
import
renderRoutes
from
'
ui/renderRoutes
'
;
import
TopNavigation
from
'
./headers/v1/NavigationBar
'
;
import
{
ROLE_ADMINISTRATOR
,
ROLE_VETTEDUSER
}
from
'
constants/userRoles
'
;
const
DASHBOARD_MENUS
=
[
{
...
...
@@ -32,6 +33,7 @@ const DASHBOARD_MENUS = [
{
to
:
'
/dashboard/datasets/
'
,
label
:
'
common.menu.catalog
'
,
auth
:
[
ROLE_VETTEDUSER
,
ROLE_ADMINISTRATOR
],
subMenus
:
[
{
to
:
'
/dashboard/datasets/
'
,
...
...
@@ -50,6 +52,7 @@ const DASHBOARD_MENUS = [
{
to
:
'
/dashboard/subsets
'
,
label
:
'
subsets.dashboard.menu.subsets
'
,
auth
:
[
ROLE_VETTEDUSER
,
ROLE_ADMINISTRATOR
],
},
];
...
...
src/user/ui/LoginPage.tsx
View file @
c421f54e
...
...
@@ -38,7 +38,7 @@ class LoginContainer extends React.Component<ILoginContainerProps, void> {
return
checkTokenRequest
(
access_token
);
})
.
then
((
data
)
=>
{
history
.
push
(
'
/
dashboard
'
);
history
.
push
(
'
/
'
);
return
false
;
}).
catch
((
e
)
=>
{
const
data
=
_
.
get
(
e
,
'
response.data
'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment