mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-14 22:30:55 -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
|