diff options
author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-05-19 02:43:08 -0400 |
---|---|---|
committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-05-19 02:43:08 -0400 |
commit | 10d7773dccdc3cada5e7e34926de69b9f3631414 (patch) | |
tree | eaf4fa5062e6a77d7aac9f19cafa48df3ec89f5b /src/client/views/MainView.tsx | |
parent | 4667498586c19f7fff1e411f5842e8ae6903b39a (diff) |
Added safe mode
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r-- | src/client/views/MainView.tsx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index c3f3a63de..bdd3e9650 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -31,6 +31,7 @@ import { DocServer } from '../DocServer'; import { listSpec } from '../../new_fields/Schema'; import { Id } from '../../new_fields/RefField'; import { HistoryUtil } from '../util/History'; +import { CollectionBaseView } from './collections/CollectionBaseView'; @observer @@ -60,6 +61,12 @@ export class MainView extends React.Component { if (window.location.search.includes("readonly")) { DocServer.makeReadOnly(); } + if (window.location.search.includes("safe")) { + if (!window.location.search.includes("nro")) { + DocServer.makeReadOnly(); + } + CollectionBaseView.SetSafeMode(true); + } if (window.location.pathname !== RouteStore.home) { let pathname = window.location.pathname.substr(1).split("/"); if (pathname.length > 1) { |