mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-24 21:12:38 -04:00
13 lines
354 B
TypeScript
13 lines
354 B
TypeScript
|
import { useEditorContext } from '../context/editor-context'
|
||
|
import getMeta from '@/utils/meta'
|
||
|
|
||
|
function useViewerPermissions() {
|
||
|
const { permissionsLevel } = useEditorContext()
|
||
|
|
||
|
const hasViewerPermissions =
|
||
|
getMeta('ol-linkSharingWarning') && permissionsLevel === 'readOnly'
|
||
|
return hasViewerPermissions
|
||
|
}
|
||
|
|
||
|
export default useViewerPermissions
|