mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
prompt guests to register or log in when viewing editable shared folders
This commit is contained in:
parent
ea2ae2aa34
commit
3658fe93de
@ -3907,7 +3907,17 @@ define([
|
||||
setEditable(true, false, true);
|
||||
}
|
||||
|
||||
if (APP.readOnly) {
|
||||
if (APP.readOnly && !APP.loggedIn) {
|
||||
(function () {
|
||||
var $banner = $(Pages.setHTML(h('div.cp-app-drive-content-info-box'), Messages.fm_info_sharedFolder));
|
||||
$banner.find('[href="/login/"], [href="/register/"]').click(function (ev) {
|
||||
ev.preventDefault();
|
||||
var page = this.getAttribute('href').replace(/\//g, '');
|
||||
common.setLoginRedirect(page);
|
||||
});
|
||||
$content.prepend($banner);
|
||||
}());
|
||||
} else if (APP.readOnly) {
|
||||
// Read-only drive (team?)
|
||||
$content.prepend($readOnly.clone());
|
||||
} else if (sfId && folders[sfId] && folders[sfId].readOnly) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user