Whenever we disable a user in our application and if the user is already login and using the website, its session should expire. But this does not happen right now and user is able to keep using the website.
However, if disabled user tries to login again then he cannot login, which is correct.
Is this a known issue? What could be the fix for it?
(We are using ASP.NET Zero + jQuery)
Thanks!
We have successfully integrated with ADFS and users are able to login. If the user currently logging in does not have account on website, it gets created and login the user. Which is expected behavior.
We have hundreds of users that we need to be in the website but we cannot ask each of them to login to website. We need their accounts present in the website to perform certain operation with them e.g. assigning them some tasks etc.
Is there a way to import all ADFS users into aspnet zero?
Hi,
I am using Google SSO to sign into application. i am able to login successfully into application. But I tried to use scope with this but it is showing error. It is taking me back to login page.
How can i add scopes. i added following code in startup.cs
private static GoogleOAuth2AuthenticationOptions CreateGoogleAuthOptions()
{
//return new GoogleOAuth2AuthenticationOptions
//{
// ClientId = ConfigurationManager.AppSettings["ExternalAuth.Google.ClientId"],
// ClientSecret = ConfigurationManager.AppSettings["ExternalAuth.Google.ClientSecret"]
//};
var options = new GoogleOAuth2AuthenticationOptions
{
ClientId = ConfigurationManager.AppSettings["ExternalAuth.Google.ClientId"],
ClientSecret = ConfigurationManager.AppSettings["ExternalAuth.Google.ClientSecret"]
};
options.Scope.Add("https://www.googleapis.com/auth/drive");
return options;
}
Thanks
Hi,
I am using goolge SSO to login. when i click goolge button it taken to select user and come back to login page. It is not allowing me to go to index page.
i added keys in web config.
Thanks Himanshu sharma
Hi ,
I want to fix first column in jtable. How can i achieve this ?
Thanks
I have made a HTMLHelper extension method to be used from the Razor view. When this method gets called, some logic is required to get information from some other class/method. This class uses dependency injection.
Now I'm not sure how can I call that class from the extension method.
Please see below for the code-
public static class VehicleTrackingFieldAccessHtmlHelper
{
public static IHtmlString VehicleTrackingFieldAccessFor<TModel, TValue>(
this HtmlHelper<TModel> html,
Expression<Func<TModel, TValue>> expression,
int VT_ID,
long OU_ID)
{
var x = ModelMetadata.FromLambdaExpression<TModel, TValue>(expression, html.ViewData);
if (x.AdditionalValues.ContainsKey(CreateNewVehicleTrackingInput.FieldAccessKey))
{
var vtField = (Enums.Database.VT_Fields)x.AdditionalValues[CreateNewVehicleTrackingInput.FieldAccessKey];
// Error/Problem is at this line
// This constructor requires an argument (_vehicleTrackingFieldAccessAppService) to be passed.
// But we don't have access to it here.
return new VehicleTrackingFieldAccessHtmlHandler().ProcessFields(vtField, VT_ID, OU_ID).Result;
}
return new HtmlString("");
}
}
public class VehicleTrackingFieldAccessHtmlHandler
{
private readonly IVehicleTrackingFieldAccessAppService _vehicleTrackingFieldAccessAppService;
public VehicleTrackingFieldAccessHtmlHandler(IVehicleTrackingFieldAccessAppService vehicleTrackingFieldAccessAppService)
{
_vehicleTrackingFieldAccessAppService = vehicleTrackingFieldAccessAppService;
}
private async Task<IHtmlString> ProcessFields(Enums.Database.VT_Fields vtField, int VT_ID, long OU_ID)
{
var fieldAccess = await GetUserPermissionsForVtFields(VT_ID, OU_ID);
switch (vtField)
{
case Enums.Database.VT_Fields.Customer_First_Name:
return new HtmlString("");
default:
return new HtmlString("");
}
}
}
Thanks
ASP.NET Zero has Role-based access and we can perfectly control actions (Create, Read, Update and Delete) that a user can perform.
How about field level authorization? We need the ability to control user by role and some other conditions to define their access level to each field. For example, a form has a field "Date". While creating new entry, some can pick value for "Date" field however, other user should not be able to see this field but they may update it in the existing records or may be not.
Is it something already offered in ASP.NET Zero?
We want to link OUs to a separate table. Is it possible add a new column with Foreign Key constraint in OrganizationUnit table? Please guide if so,
Is there any link between OU and Roles in ASP.NET Zero? Both of them seems to be completely independent. Is Zero completely missed this functionality?