csharpfritz / CoreWiki

A simple ASP.NET Core wiki that we are working on during live coding streams
MIT License
416 stars 157 forks source link

User Administration Page #213

Open csharpfritz opened 6 years ago

csharpfritz commented 6 years ago

Need a user administration page to allow an administrator to set roles on users and manage users

cmjchrisjones commented 6 years ago

Hi Jeff, I started doing something similar a while back to a project/portal I was building which never actually saw the light of day, but am going to see if I can lift and shift some of that code to get the result I think/hope your looking for.

Iā€™m gonna give it a try over the next few days, and if I suceed I will raise a PR and look forward to yours and the communities feedback.

PS, keep up the good work on the live streams šŸ‘šŸ˜‰

ashleybroughton commented 6 years ago

Did you get a chance to look into this @cmjchrisjones ?

cmjchrisjones commented 6 years ago

@ashleybroughton Still looking, my first iteration was done on 1.1 and lots of stuff has moved on since, and this is also my first foray into the world of razor pages and the new identity stuff so wasn't as simple lift and shift I thought it may have been!

csharpfritz commented 6 years ago

Are there good ideas or practices there we could re-use? This feels like a set of pages EVERYONE needs and could be a razor class library.

Jeff

On Jul 29, 2018, at 07:36, Chris Jones notifications@github.com wrote:

@ashleybroughton Still looking, my first iteration was done on 1.1 and lots of stuff has moved on since, and this is also my first foray into the world of razor pages and the new identity stuff so wasn't as simple lift and shift I thought it may have been!

ā€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

cmjchrisjones commented 6 years ago

@csharpfritz sounds like a good idea, now reading up on it as again something I wasn't aware off :)

cmjchrisjones commented 6 years ago

@ashleybroughton @csharpfritz - so my latest update is I've made some rough progress, you can check it out here if you so choose.

https://github.com/cmjchrisjones/CoreWiki/tree/user-admin-pages

The code does need some TLC and refactoring (and a deeper look into RCL as I still need to get my head around it), but I've got it so that:

cmjchrisjones commented 6 years ago

Update: I think I've found the issue, I may be wrong but I think its to do with how the seeded roles are being created (not via RoleManager). Although using the HasData method its getting added with Name and NormalizedName, it doesn't appear to like it when I'm using those roles. However if I create the role using the Create new roles I mentioned above its working. In the case of using HasData I think its because it isn't uppercase'd although I have tried that and letting the DB recreate but that didn't work HasData does work, I just forgot I need to create a migration [facepalm]

cmjchrisjones commented 6 years ago

Hi @csharpfritz, not sure if you get much chance to read through the mountain of YouTube comments along with all the other stuff your're doing so thought I'd copy here too :).

I'm in the UK (AKA Jon Skeet land :)) so was unable to watch the stream live but am now catching up :)

Agree, my first iteration I had a nice multi select list panel which would only show roles you didn't have for add and roles you had for remove (hope that makes sense). Amend role was potentially for updating, EG you had created a role but later decided to rename but agree could be used for adding claims (for now though it was just a button with no page handler for it). Also agree the UI could do with some more TLC but am happy to do some more work on it to try and address the comments raised during the stream.

csharpfritz commented 6 years ago

All great ideas! Lets record these as issues so we can track them

Great work Chris!

Jeff

On Fri, Aug 3, 2018 at 4:20 PM, Chris Jones notifications@github.com wrote:

Hi @csharpfritz https://github.com/csharpfritz, not sure if you get much chance to read through the mountain of YouTube comments along with all the other stuff your're doing so thought I'd copy here too :).

I'm in the UK (AKA Jon Skeet land :)) so was unable to watch the stream live but am now catching up :)

Agree, my first iteration I had a nice multi select list panel which would only show roles you didn't have for add and roles you had for remove (hope that makes sense). Amend role was potentially for updating, EG you had created a role but later decided to rename but agree could be used for adding claims (for now though it was just a button with no page handler for it). Also agree the UI could do with some more TLC but am happy to do some more work on it to try and address the comments raised during the stream.

ā€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/csharpfritz/CoreWiki/issues/213#issuecomment-410365760, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEy8ZJOxnHDyF6C3DAE_US3tIcnbGdaks5uNLB6gaJpZM4VZqxS .