Repository navigation
Conversation
143a6c0 to
e14ef37
Compare
Definitely! It was only put into the menu on the main page, because there was no profile page yet.
Not sure if you got all, but EJS will definitely complain when there is something missing. All in all, I really like your work! Seems like user profiles are moving forward! And I'm really curious about what we will get as result! |
|
How does this interact with users from other auth sources, eg. LDAP? Normal apps might not have permission to change user attributes or delete them. |
|
@davidmehren Just realized you referred to the editing of the attributes in CodiMD. Not sure if we want to restrict them. How do other application handle that? I think most of them simply allow to change these details. At least discourse and GitLab do so, as far as I can say. |
|
Thanks for reminding me, until now i was only concerned with local users. I will add it to the TODO list. Since I use none of the other login providers, I'd value any input on that part. I might need to disable password change for those users, but display name ( |
7dea6dd to
0929c51
Compare
| type: DataTypes.STRING | ||
| type: DataTypes.STRING, | ||
| validate: { | ||
| is: /^[a-z0-9\-+ ]+$/i, |
There was a problem hiding this comment.
this is just an example. It should be replaced before this gets merged. What do we want to allow for display names? Personally, I wouldn't want to restrict this too much.
There was a problem hiding this comment.
Mhm, should we make a difference between a Display name and a username? I think that would be useful.
so johndoe is my username (where I would go for something like [a-z0-9_-]) and a Display name: John Smith which is free because as display name people may want to use non-latin characters since their Name is Arabic, Chinese, German, French, …
There was a problem hiding this comment.
the name attribute is meant as display name. I'll change the property (and db field) name to reflect that. But even with that in place, I'd like to disallow at least <>'"=%/:
currently, we don't have a username. For local users, the email address would be the closest thing. For remotely authenticated, I have no clue what would be in its stead.
I wouldn't want to create a third thing (email - username - displayname) as we have not technical neccessity for it. We could add something like a shorthand. Like John Doe -> johnd that could (one day) be used for things like @johnd (which I would like to link back to the user profile) or in urls (think /profile/johnd or perhaps /johnd/note-1).
There was a problem hiding this comment.
we could of course introduce (technical) username and (human readable) display name and
- make email optional (for now, we're not using or verifying it anyway)
- make display name default to username, so people don't have to provide five thins when signing up.
There was a problem hiding this comment.
Yes, that should be the way to go. We already have the concept of display names in various (maybe all except local?) login methods, so I think we should do this.
And while the username can be quite strict, the Display name allows all kinds of versions. And of course, yes, the default display name should simply be the username.
d7fe5d0 to
b7d3cd7
Compare
| validate: { | ||
| is: /^[a-z0-9\-+ ]+$/i, | ||
| len: [1,255] | ||
| len: [2, 255] |
There was a problem hiding this comment.
I would even go for 3 characters as minimum length
There was a problem hiding this comment.
this change is a by-product of a validation test I made. I shouldn't have committed it. Personally, I see no real reason to restrict this at all (beyond "must be set to something printable"). In chinese or japanese, a single character could be a proper name. I did set an upper bound, because the database field is a varchar(255), though.
f73065b to
5903d71
Compare
| "About You": "About You", | ||
| "Visit public profile": "Visit public profile", | ||
| "User could not be saved.": "User could not be saved", | ||
| "name/Validation is failed": "Name contains invalid characters", |
There was a problem hiding this comment.
In two places I did not conform to the normal "human readable" pattern of this file. This is the first: the validation error messages from sequelize are just bad. To know which field is affected, I concatenate them with a slash.
| "email/Validation isEmail failed": "Email is not a valid address", | ||
| "invalid_password_given/invalid old password": "Old password is incorrect", | ||
| "confirmation_matches/password and confirmation do not match": "Password and confirmation do not match", | ||
| "user.name": "name", |
There was a problem hiding this comment.
this is the other place: I want to translate the user properties, and I think it is important that we know that this is about the user model.
|
I will be going for username / displayname next. Along the way I'll probably rebase this a few times, so previous discussion might end up folded up in github. |
f5f0020 to
7bcd5d5
Compare
Signed-off-by: Claudius <opensource@amenthes.de>
Signed-off-by: Claudius <opensource@amenthes.de>
Signed-off-by: Claudius <opensource@amenthes.de>
Signed-off-by: Claudius <opensource@amenthes.de>
Signed-off-by: Claudius <opensource@amenthes.de>
Signed-off-by: Claudius <opensource@amenthes.de>
Signed-off-by: Claudius <opensource@amenthes.de>
Signed-off-by: Claudius <opensource@amenthes.de>
Signed-off-by: Claudius <opensource@amenthes.de>
Signed-off-by: Claudius <opensource@amenthes.de>
Signed-off-by: Claudius <opensource@amenthes.de>
74ab93e to
6988f9f
Compare
…se you couldn't add a new user with the current signup form Signed-off-by: Claudius <opensource@amenthes.de>
6988f9f to
5b5baf2
Compare
|
closing in favor of hedgedoc/hedgedoc#34 |
|
Just wondering, was the profile page ever been implemented in any way? I just spun up a CodiMD instance in docker and I can't seem to find my profile page nor change the (auto-generated) username. At least changing the username and profile picture would be something I'd really like to do. |
|
I no longer contribute to CodiMD, but I proposed some of this in hedgedoc/hedgedoc#34 as mentioned above. |
I am currently implementing a profile page that would let you edit your display name (henceforth:
name) and possibly edit your password. It is far from finished, and I did a little bit of groundwork for future pages along the way. Those should get their own pull requests, probably. Also this will contain commits not directly related to either one, more specifically those from PR #947 )Questions:
app.localswhich are available in the template files. Does this work for you? I find this much cleaner. All those changes are now proposed as PR in removing global site layout vars from individual routers #1035TODO:
-----8<---- MVP line, cut here if neccessary ---8<----/user/:usernameactually use username instead of user.iddocuments i contributed and document I own is a bit tricky, those should be opt-in since they make documents discoverable that would otherwise have remained hidden.(checked off for "won't be done for now")For a MVP we could "just not link to it, yet" but already deploy it. We could get some feedback this way and improve it more before we officially ship it.