-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
bug/many2one_relationship_dropdown #1194
bug/many2one_relationship_dropdown #1194
Conversation
{ | ||
<%_ if (databaseType === 'mongodb') { _%> | ||
var page = await Task.FromResult((_userManager.Users as IMongoQueryable<User>) | ||
.Include(it => it.UserRoles) |
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.
user roles and role is not necessary
.UsePageable(request.Page)); | ||
<%_ } else { _%> | ||
var page = await _userManager.Users | ||
.Include(it => it.UserRoles) |
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.
user roles and role is not necessary
{ | ||
<%_ if (databaseType === 'mongodb') { _%> | ||
IPage<User> users = await (_userManager.Users as IMongoQueryable<User>) | ||
.Include(it => it.UserRoles) |
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.
user roles and role is not necessary
return users; | ||
<%_ } else { _%> | ||
return await _userManager.Users | ||
.Include(it => it.UserRoles) |
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.
user roles and role is not necessary
using Microsoft.AspNetCore.Identity; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.Extensions.Logging; | ||
using Microsoft.EntityFrameworkCore; |
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.
there are multiple unused using
…ic user queries & user service
|
||
|
||
[HttpGet] | ||
public async Task<ActionResult<IEnumerable<User>>> GetAllPublicUsers(IPageable pageable) |
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.
return an USERDTO here
private readonly IMediator _mediator; | ||
<%_ } else { _%> | ||
private readonly IMapper _mapper; | ||
private readonly IMailService _mailService; |
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.
Can you remove unused fields (mailservice and user manager)
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.
Yes, I can
Kudos, SonarCloud Quality Gate passed!
|
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.
Looks good to me, thanks for your contribution !
Hi,
I created new controller ( PublicUsersControllers) who return only activated users.
This controller have route "/api/users".
Please make sure the below checklist is followed for Pull Requests.
All continuous integration tests are green
Tests are added where necessary
Documentation is added/updated where necessary
Coding Rules & Commit Guidelines as per our CONTRIBUTING.md document are followed