mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05: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
|