Thanks for the hints.
Actually both office 365 and free outlook.com. will that incur more configurations?
Thanks Ismail.
OpenId or ADFS could be used to authenticate with Microsoft Account (Outlook.com)? Any example on how to configure these?
Thanks
Hello, Is authenticating users with Microsoft Account already pre-built in the framework? I am developing a module to integrate with OneDrive and I was wondering if this is already built-in.
According to this article, I can configure that as it is shown here: <a class="postlink" href="https://www.benday.com/2014/02/25/walkthrough-asp-net-mvc-identity-with-microsoft-account-authentication/">https://www.benday.com/2014/02/25/walkt ... ntication/</a>
If this integration is not currently available, shall I follow the above article? Anything specific to Abp?
Thanks
Hello Ismail, Here is the directive. I am sure it can be more enhanced and I would be thankful if you improve on it and then share it with me again.
(function () {
function validationDate() {
function link($scope, $element, $attrs, $ctrl) {
$ctrl.$validators.vd = function (value) {
if (value === undefined || value === null) { // usually value is undefined when its initialized
return true;
}
// validate with moment
return moment(new Date(value), app.drc.consts.momentDateFormat, true).isValid();
}
/*
since we are using ng-model and not k-ng-model
I need to convert whatever DatePicker assigns
to the date value, convert it to moment
*/
$ctrl.$parsers.unshift(function (value) {
if (value && (typeof value === "string")) {
if (!moment(value, app.drc.consts.momentDateFormat, true).isValid()) {
value = ''; // since its empty the validation above will fire
}
else {
value = moment(value, app.drc.consts.momentDateFormat).toDate();
//console.log('Value Stored in model: ', value);
}
return value;
}
return '';
});
/*
Value set by controller (or loaded from serevr)
=> Convert to a format understood by Kendo
*/
$ctrl.$formatters.unshift(function (value) {
if (value) {
//console.log('Value Stored in Kendo DatePicker: ', kendo.parseDate(value));
return kendo.parseDate(value);
}
})
}
return {
require: 'ngModel',
restrict: 'A',
link: link
}
}
appModule.directive('validationDate', validationDate);
})();
Hello, I will email you the code of that is causing the exception. Check your inbox please.
Thanks
Yes true. Some users will be assigned to regions hence they want to be able to see data under all tenants they have access to.
I'm using a single dB which I think will be easier to do correct?
One more thing, is it okay to extend the Tenant and User entities as per above?
Thanks
That sounds interesting.
To recap:
A tenant is to be extended with a new property called 'Region'. Upon creation of a new Tenant a region will be assigned accordingly.
A host user makes more sense to be given access to multiple tenants instead of tenant user.
A host admin needs to assign users to regions. This way the app would query data from all the tenants under each assigned region. An example: region 1 is assigned to 2 tenants. A user would get data from 2 tenants under region 1.
The User Region entity. Is it a many to many relation between user and region? I can create a new entity UserRegion and then add a new property of list of UserRegion on the User entity?
How does it sound?
Originally given the fact regions are static I thought of creating a role per region and add users to roles. Then a union between regions for all roles the user is assigned to would give me all regions. However I like more your solution. It's more dynamic.
Thanks
Hi Ismail So how would I link user to Region?
The user cannot be part of a Tenant to view other tenants right? So I need to create user as host user.
Then according to what you said I should be linking user to Region?
Can you pls illustrate more Thanks
Thanks, that was it :)
Any idea please?
Thanks