-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Admin user management #1330
Admin user management #1330
Conversation
ALLOW_UNCONFIRMED_ACCESS_FOR=2.days | ||
|
||
# Duration for which the confirmation token is valid | ||
CONFIRM_WITHIN=3.days |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3.days
works in the .env file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see parse_duration
:)
Awesome! @TildeWill will appreciate this for his hosting efforts. |
I'm pretty excited, user management has always felt missing to me. |
322fc74
to
df349a7
Compare
@TildeWill @cantino Would you mind giving it another look? I think I incorporated your feedback. |
@dsander thanks for the migration. This will be a big help! |
Awesome, I'll take another look at this and your other files PR in the next couple days. (Sorry, very busy right now.) I really appreciate all the work you're putting into these! |
@cantino No problem, family and work always comes first 😄 |
@@ -172,4 +172,27 @@ | |||
expect(tuples).to eq expected | |||
end | |||
end | |||
|
|||
context "#parse_duration" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend adding a spec for the positive cases too.
expect(Utils.parse_duration('2.days')).to eq(2.days)
expect(Utils.parse_duration('2.seconds')).to eq(2)
expect(Utils.parse_duration('2')).to eq(2)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, done.
Awesome work! |
7d470bf
to
c2d74cd
Compare
d7fdb2c
to
c0c7411
Compare
Thanks for the reviews and feedback! @cantino @knu @TildeWill |
:)
|
Just merged this into my fork and deployed, so awesome! I can see at a glance how people are using the site. Thanks @dsander!!! |
@TildeWill Glad you like it 😄 |
This PR breaks in Heroku 😭
|
You need to run |
Solved!! |
…collation issues In MySQL, the default collation is case insensitive. Since the uniqueness validator enforces case sensitive comparison by default, it frequently causes mismatched collation issues (performance, weird behavior, etc) to MySQL users. https://grosser.it/2009/12/11/validates_uniqness_of-mysql-slow/ #1399 #13465 gitlabhq/gitlabhq@c1dddf8 huginn/huginn#1330 (comment) This extracts `default_uniqueness_comparison` to ease to handle the mismatched collation issues on the connection.
In MySQL, the default collation is case insensitive. Since the uniqueness validator enforces case sensitive comparison by default, it frequently causes mismatched collation issues (performance, weird behavior, etc) to MySQL users. https://grosser.it/2009/12/11/validates_uniqness_of-mysql-slow/ rails#1399 rails#13465 gitlabhq/gitlabhq@c1dddf8 huginn/huginn#1330 (comment) I'd like to deprecate the implicit default enforcing since I frequently experienced the problems in code reviews. Note that this change has no effect to sqlite3, postgresql, and oracle-enhanced adapters which are implemented as case sensitive by default, only affect to mysql2 adapter (I can take a work if sqlserver adapter will support Rails 6.0).
This adds a basic user management interface. Admins can create and edit users, additionally user accounts can be deactivated which also stops their agents from running. The deactivation works independently from the devise account locking.
Many of the devise configuration options are now accessible via the
.env
file.#371
#1121
Thanks to kreuzwerker.de who are paying me to work on this in the context of the research project 'Digitale Kuratierungstechnologien' of which they are a part of.