We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05301a8 commit fc3d7e7Copy full SHA for fc3d7e7
src/public.js
@@ -4,17 +4,18 @@
4
*/
5
6
import Vue from 'vue'
7
+import { getCurrentUser } from '@nextcloud/auth'
8
import UserApp from './UserApp.vue'
9
10
Vue.prototype.t = t
11
Vue.prototype.n = n
12
Vue.prototype.OC = OC
13
Vue.prototype.OCA = OCA
14
-const hasToken = (document.getElementById('sharingToken') !== null)
15
+const isPublicPage = getCurrentUser() === null
16
const isPasswordProtected = (document.getElementById('password-submit') !== null)
17
-if (hasToken && !isPasswordProtected) {
18
+if (isPublicPage && !isPasswordProtected) {
19
const tofc = document.createElement('div')
20
tofc.id = 'terms_of_service_confirm'
21
document.body.insertAdjacentElement('afterbegin', tofc)
0 commit comments