Coder Social home page Coder Social logo

identitymanagerui's People

Contributors

mguinness avatar pgkdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

identitymanagerui's Issues

Apparent missing _Layout and associated files

I think I have successfully integrated the IdentityManagerUI Razor class library into my project using your guidelines in the ReadMe.

However, when I call /IdentityManager/home/users I get the following error: InvalidOperationException: The layout view '_Layout' could not be located.

I noticed that the re is no /Views/Shared/_Layout.cshtml file in the IdentityManagerUI code set. When I install my own test /Views/Shared/_Layout.cshtml file the application works but without any styling on the pages.

Is there something missing in the download file: or have I missed something?

NuGet package

Is this available as a nuget package so I could add it as a package reference?

Modals don't open

Hi @mguinness ,

first I want to thank you for this great project! I know you have created the united repo but I have a question for this server side solution.

I've implemented this in my .net 8 solution as I am not using Blazor / Blazor United, just the asp.net core mvc server site project.

When running your core 3.1 solution its working fine. Modal windows do open and I can edit etc.
When running my solution, clicking the buttons like "Edit" on a selected user doesn't open up the Modal. Nothing happens. The Modal TagHelper is recognized but it seems like it is not executing the script code.

Would you have an idea what I am missing?

Data table modal buttons not working integrated into an in asp.net core 6 project

This is strange, I swear I had this working last week and now it's not. I've added the project to a new solution created from a basic Asp.net core 6 Razor Pages web template. I've made all the required changes to get /IdentityManager/Home/Users working and it successfully shows any existing users in the database. However pressing any of the New, Edit, Delete, Password buttons doesn't show a modal. Same with the roles. Nothing happens.

There are no errors in the browser console, and from looking through the code popping up the modal shouldn't trigger any API calls - that should only be on submit (also nothing in Sources).

Any pointers on where I should look to troubleshoot this?

Question Circular References

Hi,
I integrated your IdentityManagerUI in a Test Project and I have a problem with fixing circular References.
The circular References occur in my models and not in your ApplicationUser or ApplicationRole.
I can fix the issue by changing services.addControllersWithViews in Startup.cs:

services.AddControllersWithViews().AddRazorRuntimeCompilation() .AddJsonOptions(options => { options.JsonSerializerOptions.ReferenceHandler = ReferenceHandler.Preserve; });

This fixes my models and I can use Swagger to succesfully test my Models. But it also breaks the IdentityManagerUI.
The tables for users and roles are empty.
Maybe you know what the problem is.

Login Audits / has tenant

Hello, I can only express a deep thanks, on behald of ASP developers/teachers/students for this. This is the only solution by far that enables a management UI for user/roles and claims OOB, I am using core 6, and it builds fine. I think you have to manually update it & the nugets.

  • Can you please allow for Log-in Audits tables, to view users log-in attempts/success/fail or spoof, ddos, phishing evidence.
public class AuditModel
{
    public int AuditId { get; set; }
    public string Area { get; set; }
    public string ControllerName { get; set; }
    public string ActionName { get; set; }
    public string RoleId { get; set; }
    public string LangId { get; set; }
    public string IpAddress { get; set; }
    public string IsFirstLogin { get; set; }
    public string LoggedInAt { get; set; }
    public string LoggedOutAt { get; set; }
    public string LoginStatus { get; set; }
    public string PageAccessed { get; set; }
    public string SessionId { get; set; }
    public string UrlReferrer { get; set; }
    public string UserId { get; set; }
}
  • Also any chance you can incorporate the ZZZ framework here to filter/has tenant. like so...

https://github.com/MultiTenancyServer/MultiTenancyServer
https://www.codingame.com/playgrounds/5514/multi-tenant-asp-net-core-4---applying-tenant-rules-to-all-enitites
https://aspnetboilerplate.com/Pages/Documents/Multi-Tenancy
https://www.mianquan.net/tutorial/serenity-guide/tutorials-multi_tenancy-filtering_users_by_tenantid.md

// Add Multi-Tenancy Server defining TTenant<TKey> as type Tenant with an ID (key) of type string.
    services.AddMultiTenancy<Tenant, string>()
        // Add one or more IRequestParser (MultiTenancyServer.AspNetCore).
        .AddRequestParsers(parsers =>
        {
            // Parsers are processed in the order they are added,
            // typically 1 or 2 parsers should be all you need.
            parsers
                // www.tenant1.com
                .AddDomainParser()
                // tenant1.tenants.multitenancyserver.io
                .AddSubdomainParser(".tenants.multitenancyserver.io")
                // from partial hostname
                .AddHostnameParser("^(regular_expression)$")
                // HTTP header X-TENANT = tenant1
                .AddHeaderParser("X-TENANT")
                // /tenants/tenant1
                .AddChildPathParser("/tenants/")
                // from partial path
                .AddPathParser("^(regular_expression)$")
                // ?tenant=tenant1
                .AddQueryParser("tenant")
                // Claim from authenticated user principal.
                .AddClaimParser("http://schemas.microsoft.com/identity/claims/tenantid")
                // Add custom request parser with lambda.
                .AddCustomParser(httpContext => "tenant1");
                // Add custom request parser implementation.
                .AddMyCustomParser();
        })

Users.cshtml has ajax error and doesn't load any data

Upon loading /IdentityManager/Home/Users locally, I get this popup message:

DataTables warning: table id=usersTable - Ajax error. For more information about this error, please see http://datatables.net/tn/7

Chrome console gives me this error:
Request URL: https://localhost:44385/api/UserList?draw=1&columns[0][data]=id&columns[0][name]=&columns[0][searchable]=true&columns[0][orderable]=true&columns[0][search][value]=&columns[0][search][regex]=false&columns[1][data]=email&columns[1][name]=&columns[1][searchable]=true&columns[1][orderable]=true&columns[1][search][value]=&columns[1][search][regex]=false&columns[2][data]=userName&columns[2][name]=&columns[2][searchable]=true&columns[2][orderable]=true&columns[2][search][value]=&columns[2][search][regex]=false&columns[3][data]=displayName&columns[3][name]=&columns[3][searchable]=true&columns[3][orderable]=false&columns[3][search][value]=&columns[3][search][regex]=false&columns[4][data]=roles&columns[4][name]=&columns[4][searchable]=true&columns[4][orderable]=false&columns[4][search][value]=&columns[4][search][regex]=false&columns[5][data]=lockedOut&columns[5][name]=&columns[5][searchable]=true&columns[5][orderable]=false&columns[5][search][value]=&columns[5][search][regex]=false&order[0][column]=0&order[0][dir]=asc&start=0&length=10&search[value]=&search[regex]=false&_=1678181358606
Request Method: GET
Status Code: 500
Remote Address: [::1]:44385
Referrer Policy: strict-origin-when-cross-origin

The datatables.net link above says that the problem might be related with browsers preventing loading external scripts from localhost, but Roles.cshtml loads without errors and /api/RoleList gives back status code of 200.

Can anyone help me figure out what's going on?

Add-Migration generates duplicated foreign keys for Users and Roles related tables

Great project!
But when I tested it in a real database using .net core 3.1, the migration was generating duplicated Foreign Keys for Identity respective Users and Roles tables.

The solution was this, maybe you want to fixe it:
public class ApplicationDbContext : IdentityDbContext<ApplicationUser, ApplicationRole, string> { ... }
It was missing this part <ApplicationUser, ApplicationRole, string> where we specify the customized user and role classes.

Also commented here where the same problem was happening:
link

edit btn not work

Edit btn in the first time I make role check it works but when I click in edit btn the second time the edit model does not show.

Cross verify which pages are missing authorization through reflection

Hi @mguinness take a peek at this, it would be nice during compile or early runtime to run a check and see if any pages are missing or overlapping policies or roles.

The main approach there is to reflect on the assembly, gather the list of the controllers/actions collection and allow user to select which ones to setup.

Our can be to reflect and check which ones we already have, and if any are left missing/open or vulnerable.

Lastly, Rate limiting or DDOS throttle: https://codeburst.io/rate-limiting-api-endpoints-in-asp-net-core-926e31428017

For the views can we use Bootstrap 5, since its in beta already

.Net Core 6 & universal

Hello https://dotnet.microsoft.com/download/dotnet/6.0 is in preview and getting released soon, since they unified the mobile code base, I am very excited about this lib.

With the unified code base, I am wondering if the same Identity objects would be available in the mobile side as well, would like to be able to use the same admin/IdentityManagerUi even for the mobile devices.

Create Regional-Groups in a Role, how to attach a claims to a roles

Hello, thanks for this wonderful lib.

In my application I am required to separate managers-role data access across areas, SW-managers, East-Coast Mgrs etc.

So, I am trying to create Regional-Groups in a Role, using claims and a roles combination. Is this the correct approach and where/how would I do this.

thanks

Upgrade to .Net5.0

Hi.

At first, thanks for this project.

Is it possible update repository to latest asp.net core(Net 5.0 or 6.0).

[Best Regards]

Edit User modal form will not load when a role contains a space

If a user is assigned a role containing a space (e.g., "my role"), when you subsequently load the Edit user form for that user, it will not render.

Uncaught Error: Syntax error, unrecognized expression: #editForm :checkbox[value=my role]

This appears to originate in the Users.cshtml:

$.each(data.roles, function (index, value) {
  //console.log(value);
   $('#editForm :checkbox[value=' + value + ']').prop('checked', true);
});

I assume looking for a checkbox with a space in the name raises an exception. Unfortunately, I am not familiar with JavaScript or jQuery to confirm or design a solution.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.