diff options
author | Anton Tananaev <anton@traccar.org> | 2022-05-22 13:38:57 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-05-22 13:38:57 -0700 |
commit | aff28127974870c02001e8d8d44e973d0ba4fd22 (patch) | |
tree | 6c3d41939b77da228d0331fbc321e04301d9ac42 /modern/src/common/util | |
parent | aae582bd582cd7bd596a23e699ffad13c38a06c8 (diff) | |
download | trackermap-web-aff28127974870c02001e8d8d44e973d0ba4fd22.tar.gz trackermap-web-aff28127974870c02001e8d8d44e973d0ba4fd22.tar.bz2 trackermap-web-aff28127974870c02001e8d8d44e973d0ba4fd22.zip |
Remove duplication
Diffstat (limited to 'modern/src/common/util')
-rw-r--r-- | modern/src/common/util/permissions.js | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/modern/src/common/util/permissions.js b/modern/src/common/util/permissions.js index a18644a8..34aeb89d 100644 --- a/modern/src/common/util/permissions.js +++ b/modern/src/common/util/permissions.js @@ -26,10 +26,3 @@ export const useDeviceReadonly = () => useSelector((state) => { const userDeviceReadonly = state.session.user?.deviceReadonly; return !admin && (serverReadonly || userReadonly || serverDeviceReadonly || userDeviceReadonly); }); - -export const useEditable = () => useSelector((state) => { - const admin = state.session.user?.administrator; - const serverReadonly = state.session.server?.readonly; - const userReadonly = state.session.user?.readonly; - return admin || (!serverReadonly && !userReadonly); -}); |