Skip to content

Commit

Permalink
use contact email as webdav username
Browse files Browse the repository at this point in the history
  • Loading branch information
imwhatiam committed Dec 11, 2024
1 parent 4c231ea commit 6599ab8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/user-settings/webdav-password.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import SetWebdavPassword from '../dialog/set-webdav-password';
import ResetWebdavPassword from '../dialog/reset-webdav-password';
import RemoveWebdavPassword from '../dialog/remove-webdav-password';

const { username, webdavUrl, webdavPasswordSetted } = window.app.pageOptions;
const { contactEmail, webdavUrl, webdavPasswordSetted } = window.app.pageOptions;

class WebdavPassword extends React.Component {

Expand Down Expand Up @@ -92,7 +92,7 @@ class WebdavPassword extends React.Component {
<div id="update-webdav-passwd" className="setting-item">
<h3 className="setting-item-heading">{gettext('WebDAV Access')}</h3>
<p>WebDAV URL: <a href={webdavUrl}>{webdavUrl}</a></p>
<p>{gettext('WebDAV username:')} {username}</p>
<p>{gettext('WebDAV username:')} {contactEmail}</p>
{!isWebdavPasswordSetted ?
<React.Fragment>
<p>{gettext('WebDAV password:')} {gettext('not set')}</p>
Expand Down
1 change: 1 addition & 0 deletions seahub/profile/templates/profile/set_profile_react.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// overwrite the one in base_for_react.html
window.app.pageOptions = {
username: "{{request.user.username|escapejs}}",
contactEmail: "{{request.user.username|email2contact_email|escapejs}}",
avatarURL: '{% avatar_url request.user %}',
csrfToken: '{{ csrf_token }}',

Expand Down

0 comments on commit 6599ab8

Please sign in to comment.