mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-23 17:22:50 +00:00
bf90932f40
[web] Remove access to commenting/chat for collaborators with Viewer permission GitOrigin-RevId: 03957cb8c04866318a4b94bdb72843e7d7a5a003
12 lines
354 B
TypeScript
12 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
|