-
Notifications
You must be signed in to change notification settings - Fork 29
Allow users to change their own email address #8671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
knollengewaechs
wants to merge
24
commits into
master
Choose a base branch
from
users-can-change-email
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
bdab4af
allow user to change email and set email in user list to read-only
knollengewaechs 8b4ac8b
send verification email
knollengewaechs 3562d51
enable users to edit their own email address
MichaelBuessemeyer 07fabe0
allow to edit own email addres for non admins
MichaelBuessemeyer 209bf8b
add specific column tracking when the last email change was for more…
MichaelBuessemeyer 9774d5a
Merge branch 'master' into users-can-change-email
knollengewaechs 58bcc29
clean up frontend code
knollengewaechs 74fe1f2
add password verification upon email update
MichaelBuessemeyer 5b866a0
Merge branch 'users-can-change-email' of github.com:scalableminds/web…
MichaelBuessemeyer 04151f4
disallow admins updating emails of other users
MichaelBuessemeyer 8d7ed7b
add entry to MIGRATIONS.unreleased.md
MichaelBuessemeyer 8be7adb
format backend
MichaelBuessemeyer 56098bc
Merge branch 'master' into users-can-change-email
MichaelBuessemeyer 9ec548d
remove logging used for testing
MichaelBuessemeyer d443e02
Merge branch 'users-can-change-email' of github.com:scalableminds/web…
MichaelBuessemeyer cc94854
Merge branch 'master' into users-can-change-email
fm3 2a1166d
unused import
fm3 9dd940d
Merge branch 'users-can-change-email' of github.com:scalableminds/web…
fm3 7ff58c0
add missing emailChangeDate column to multi
MichaelBuessemeyer c45795f
apply pr feedback
MichaelBuessemeyer dae5355
Merge branch 'master' of github.com:scalableminds/webknossos into use…
MichaelBuessemeyer 34bb221
Merge branch 'users-can-change-email' of github.com:scalableminds/web…
MichaelBuessemeyer c9731b2
include multiuserid in in logging upon email changed by user
MichaelBuessemeyer 4477287
Update unreleased_changes/8671.md
MichaelBuessemeyer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,8 +83,8 @@ webKnossos { | |
inviteExpiry = 14 days | ||
ssoKey = "" | ||
emailVerification { | ||
activated = false | ||
required = false | ||
activated = true | ||
required = true | ||
gracePeriod = 7 days # time period in which users do not need to verify their email address | ||
Comment on lines
-86
to
88
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for testing purposes. REMOVE BEFORE MERGING |
||
linkExpiry = 30 days | ||
} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
START TRANSACTION; | ||
|
||
do $$ begin ASSERT (select schemaVersion from webknossos.releaseInformation) = 134, 'Previous schema version mismatch'; end; $$ LANGUAGE plpgsql; | ||
|
||
DROP VIEW IF EXISTS webknossos.userInfos; | ||
DROP VIEW IF EXISTS webknossos.multiUsers_; | ||
|
||
ALTER TABLE webknossos.multiUsers ADD COLUMN emailChangeDate TIMESTAMPTZ NOT NULL DEFAULT NOW(); | ||
UPDATE webknossos.multiUsers SET emailChangeDate = created; | ||
|
||
CREATE VIEW webknossos.multiUsers_ AS SELECT * FROM webknossos.multiUsers WHERE NOT isDeleted; | ||
CREATE VIEW webknossos.userInfos AS | ||
SELECT | ||
u._id AS _user, m.email, u.firstName, u.lastname, o.name AS organization_name, | ||
u.isDeactivated, u.isDatasetManager, u.isAdmin, m.isSuperUser, | ||
u._organization, o._id AS organization_id, u.created AS user_created, | ||
m.created AS multiuser_created, u._multiUser, m._lastLoggedInIdentity, u.lastActivity, m.isEmailVerified | ||
FROM webknossos.users_ u | ||
JOIN webknossos.organizations_ o ON u._organization = o._id | ||
JOIN webknossos.multiUsers_ m on u._multiUser = m._id; | ||
|
||
UPDATE webknossos.releaseInformation SET schemaVersion = 135; | ||
|
||
COMMIT TRANSACTION; |
23 changes: 23 additions & 0 deletions
23
conf/evolutions/reversions/135-extra-column-for-email-changed.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
START TRANSACTION; | ||
|
||
do $$ begin ASSERT (select schemaVersion from webknossos.releaseInformation) = 135, 'Previous schema version mismatch'; end; $$ LANGUAGE plpgsql; | ||
|
||
DROP VIEW IF EXISTS webknossos.userInfos; | ||
DROP VIEW IF EXISTS webknossos.multiUsers_; | ||
|
||
ALTER TABLE webknossos.multiUsers DROP COLUMN emailChangeDate; | ||
|
||
CREATE VIEW webknossos.multiUsers_ AS SELECT * FROM webknossos.multiUsers WHERE NOT isDeleted; | ||
CREATE VIEW webknossos.userInfos AS | ||
SELECT | ||
u._id AS _user, m.email, u.firstName, u.lastname, o.name AS organization_name, | ||
u.isDeactivated, u.isDatasetManager, u.isAdmin, m.isSuperUser, | ||
u._organization, o._id AS organization_id, u.created AS user_created, | ||
m.created AS multiuser_created, u._multiUser, m._lastLoggedInIdentity, u.lastActivity, m.isEmailVerified | ||
FROM webknossos.users_ u | ||
JOIN webknossos.organizations_ o ON u._organization = o._id | ||
JOIN webknossos.multiUsers_ m on u._multiUser = m._id; | ||
|
||
UPDATE webknossos.releaseInformation SET schemaVersion = 134; | ||
|
||
COMMIT TRANSACTION; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.