-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from plotly/authentication
Authentication
- Loading branch information
Showing
15 changed files
with
653 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
machine: | ||
python: | ||
version: 2.7.11 | ||
node: | ||
version: 6.9.2 | ||
|
||
dependencies: | ||
pre: | ||
- pip install -r tests/requirements.txt | ||
- npm install | ||
- npm run build-prod | ||
|
||
|
||
test: | ||
override: | ||
- python -m unittest discover -s tests | ||
- npm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* global window:true, document:true */ | ||
import React, {PropTypes} from 'react'; | ||
import {merge} from 'ramda'; | ||
import * as styles from './styles/styles.js'; | ||
import * as constants from './constants/constants.js'; | ||
|
||
function AccessDenied(props) { | ||
const {configRequest} = props; | ||
const fid = configRequest.content.fid; | ||
const owner_username = fid.split(':')[0]; | ||
return ( | ||
<div style={merge(styles.base.html, styles.base.container)}> | ||
|
||
<div style={styles.base.h2}> | ||
{"Access Denied"} | ||
</div> | ||
|
||
<div style={styles.base.h4}> | ||
{"Uh oh! You don't have access to this Dash app."} | ||
</div> | ||
|
||
<div> | ||
{`This app is owned by ${owner_username}. `} | ||
{`Reach out to ${owner_username} to grant you access | ||
to this app and then try refreshing the app.`} | ||
</div> | ||
|
||
<br/> | ||
|
||
<a style={styles.base.a} onClick={() => { | ||
document.cookie = ( | ||
`${constants.OAUTH_COOKIE_NAME}=; `+ | ||
'expires=Thu, 01 Jan 1970 00:00:01 GMT;' | ||
); | ||
window.location.reload(true); | ||
}}> | ||
{'Log out of session'} | ||
</a> | ||
</div> | ||
) | ||
} | ||
AccessDenied.propTypes = { | ||
configRequest: PropTypes.object | ||
} | ||
export default AccessDenied; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.