@ -0,0 +1 @@ |
|||||
|
Please describe the feature need! |
||||
@ -0,0 +1,71 @@ |
|||||
|
# For most projects, this workflow file will not need changing; you simply need |
||||
|
# to commit it to your repository. |
||||
|
# |
||||
|
# You may wish to alter this file to override the set of languages analyzed, |
||||
|
# or to provide custom queries or build logic. |
||||
|
name: "CodeQL" |
||||
|
|
||||
|
on: |
||||
|
push: |
||||
|
branches: [dev, rel-1.0, rel-1.1, rel-2.0, rel-2.1, rel-2.2, rel-2.3, rel-2.4, rel-2.5, rel-2.6, rel-2.7, rel-2.8, rel-2.9, rel-3.0, rel-3.1, rel-3.2] |
||||
|
pull_request: |
||||
|
# The branches below must be a subset of the branches above |
||||
|
branches: [dev] |
||||
|
schedule: |
||||
|
- cron: '0 8 * * 6' |
||||
|
|
||||
|
jobs: |
||||
|
analyze: |
||||
|
name: Analyze |
||||
|
runs-on: ubuntu-latest |
||||
|
|
||||
|
strategy: |
||||
|
fail-fast: false |
||||
|
matrix: |
||||
|
# Override automatic language detection by changing the below list |
||||
|
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] |
||||
|
language: ['csharp', 'javascript'] |
||||
|
# Learn more... |
||||
|
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection |
||||
|
|
||||
|
steps: |
||||
|
- name: Checkout repository |
||||
|
uses: actions/checkout@v2 |
||||
|
with: |
||||
|
# We must fetch at least the immediate parents so that if this is |
||||
|
# a pull request then we can checkout the head. |
||||
|
fetch-depth: 2 |
||||
|
|
||||
|
# If this run was triggered by a pull request event, then checkout |
||||
|
# the head of the pull request instead of the merge commit. |
||||
|
- run: git checkout HEAD^2 |
||||
|
if: ${{ github.event_name == 'pull_request' }} |
||||
|
|
||||
|
# Initializes the CodeQL tools for scanning. |
||||
|
- name: Initialize CodeQL |
||||
|
uses: github/codeql-action/init@v1 |
||||
|
with: |
||||
|
languages: ${{ matrix.language }} |
||||
|
# If you wish to specify custom queries, you can do so here or in a config file. |
||||
|
# By default, queries listed here will override any specified in a config file. |
||||
|
# Prefix the list here with "+" to use these queries and those in the config file. |
||||
|
# queries: ./path/to/local/query, your-org/your-repo/queries@main |
||||
|
|
||||
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). |
||||
|
# If this step fails, then you should remove it and run the build manually (see below) |
||||
|
- name: Autobuild |
||||
|
uses: github/codeql-action/autobuild@v1 |
||||
|
|
||||
|
# ℹ️ Command-line programs to run using the OS shell. |
||||
|
# 📚 https://git.io/JvXDl |
||||
|
|
||||
|
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines |
||||
|
# and modify them (or add more) to build your code if your project |
||||
|
# uses a compiled language |
||||
|
|
||||
|
#- run: | |
||||
|
# make bootstrap |
||||
|
# make release |
||||
|
|
||||
|
- name: Perform CodeQL Analysis |
||||
|
uses: github/codeql-action/analyze@v1 |
||||
@ -0,0 +1,7 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<configuration> |
||||
|
<packageSources> |
||||
|
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> |
||||
|
<add key="BlazoriseMyGet" value="https://www.myget.org/F/blazorise/api/v3/index.json" /> |
||||
|
</packageSources> |
||||
|
</configuration> |
||||
@ -0,0 +1,31 @@ |
|||||
|
{ |
||||
|
"culture": "ar", |
||||
|
"texts": { |
||||
|
"Volo.AbpIo.Domain:010004": "تم الوصول إلى الحد الأقصى لعدد الأعضاء!", |
||||
|
"Volo.AbpIo.Domain:010005": "تم الوصول إلى الحد الأقصى لعدد المالكين!", |
||||
|
"Volo.AbpIo.Domain:010006": "هذا المستخدم هو بالفعل مالك في هذه المنظمة!", |
||||
|
"Volo.AbpIo.Domain:010007": "هذا المستخدم هو بالفعل مطور في هذه المنظمة!", |
||||
|
"Volo.AbpIo.Domain:010008": "لا يمكن أن يكون عدد المطورين المسموح لهم أقل من عدد المطورين الحاليين!", |
||||
|
"Volo.AbpIo.Domain:010009": "لا يمكن أن يكون عدد المطورين المسموح لهم أقل من 0!", |
||||
|
"Volo.AbpIo.Domain:010010": "تم تجاوز الحد الأقصى لعدد عناوين mac!", |
||||
|
"Volo.AbpIo.Domain:010011": "لا يمكن أن تحتوي الرخصة الشخصية على أكثر من مطور واحد!", |
||||
|
"Volo.AbpIo.Domain:010012": "لا يمكن تمديد الترخيص بعد شهر واحد من انتهاء صلاحية الترخيص!", |
||||
|
"Volo.AbpIo.Domain:020001": "تعذر حذف حزمة NPM هذه لأن \"{NugetPackages}\" حزم Nuget تعتمد على هذه الحزمة.", |
||||
|
"Volo.AbpIo.Domain:020002": "تعذر حذف حزمة NPM هذه لأن \"{Modules}\" الوحدات النمطية تستخدم هذه الحزمة.", |
||||
|
"Volo.AbpIo.Domain:020003": "تعذر حذف حزمة NPM هذه لأن \"{Modules}\" الوحدات النمطية تستخدم هذه الحزمة و \"{NugetPackages}\" حزم Nuget تعتمد على هذه الحزمة.", |
||||
|
"Volo.AbpIo.Domain:020004": "تعذر حذف حزمة Nuget هذه لأن \"{Modules}\" الوحدات النمطية تستخدم هذه الحزمة.", |
||||
|
"WantToLearn?": "تريد أن تتعلم؟", |
||||
|
"ReadyToGetStarted?": "على استعداد للبدء؟", |
||||
|
"JoinOurCommunity": "انضم إلى مجتمعنا", |
||||
|
"GetStartedUpper": "دعنا نبدأ", |
||||
|
"ForkMeOnGitHub": "GitHub أعطنى تنبيه على", |
||||
|
"Features": "خصائص", |
||||
|
"GetStarted": "دعنا نبدأ", |
||||
|
"Documents": "وثائق", |
||||
|
"Community": "مجتمع", |
||||
|
"ContributionGuide": "دليل المساهمة", |
||||
|
"Blog": "المدونة", |
||||
|
"Commercial": "تجارى", |
||||
|
"SeeDocuments": "انظر للوثائق" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,35 @@ |
|||||
|
{ |
||||
|
"culture": "ar", |
||||
|
"texts": { |
||||
|
"OrganizationManagement": "إدارة المنظمة", |
||||
|
"OrganizationList": "قائمة المنظمات", |
||||
|
"Volo.AbpIo.Commercial:010003": "لست مالك هذه المنظمة!", |
||||
|
"OrganizationNotFoundMessage": "لا توجد أى منظمة!", |
||||
|
"DeveloperCount": "المحجوز / إجمالى المطورين", |
||||
|
"QuestionCount": "المتبقى / إجمالى الأسئلة", |
||||
|
"Unlimited": "غير محدود", |
||||
|
"Owners": "مُلاّك", |
||||
|
"AddMember": "تسجيل عضو", |
||||
|
"AddOwner": "تسجيل مالك", |
||||
|
"AddDeveloper": "تسجيل مطور", |
||||
|
"UserName": "اسم المستخدم", |
||||
|
"Name": "الاسم", |
||||
|
"EmailAddress": "البريد الإلكترونى", |
||||
|
"Developers": "مطورون", |
||||
|
"LicenseType": "نوع الرخصة", |
||||
|
"Manage": "إدارة", |
||||
|
"StartDate": "تاريخ البداية", |
||||
|
"EndDate": "تاريخ الإنتهاء", |
||||
|
"Modules": "Modules", |
||||
|
"LicenseExtendMessage": "تم تمديد تاريخ انتهاء الترخيص الخاص بك إلى {0}", |
||||
|
"LicenseUpgradeMessage": "تمت ترقية ترخيصك إلى {0}", |
||||
|
"LicenseAddDeveloperMessage": "تمت إضافة {0} من المطورين إلى ترخيصك", |
||||
|
"Volo.AbpIo.Commercial:010004": "لا يمكن العثور على المستخدم المحدد! يجب أن يكون المستخدم قد سجل بالفعل.", |
||||
|
"MyOrganizations": "منظماتى", |
||||
|
"ApiKey": "مفتاح API", |
||||
|
"UserNameNotFound": "لا يوجد مستخدم باسم {0}", |
||||
|
"SuccessfullyAddedToNewsletter": "شكرا لك على الاشتراك في النشرة الإخبارية لدينا!", |
||||
|
"MyProfile": "ملفي", |
||||
|
"EmailNotValid": "من فضلك أدخل بريد أليكترونى صحيح." |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,68 @@ |
|||||
|
{ |
||||
|
"culture": "ar", |
||||
|
"texts": { |
||||
|
"Permission:CommunityArticle": "مقالة المجتمع", |
||||
|
"Permission:Edit": "تعديل", |
||||
|
"Waiting": "انتظار", |
||||
|
"Approved": "تمت الموافقة", |
||||
|
"Rejected": "مرفوض", |
||||
|
"Wait": "انتظر", |
||||
|
"Approve": "موافق", |
||||
|
"Reject": "رفض", |
||||
|
"ReadArticle": "إقرأ المقال", |
||||
|
"Status": "الحالة", |
||||
|
"ContentSource": "مصدر المحتوى", |
||||
|
"Details": "التفاصيل", |
||||
|
"Url": "عنوان الموقع", |
||||
|
"Title": "العنوان", |
||||
|
"CreationTime": "وقت الإنشاء", |
||||
|
"Save": "حفظ", |
||||
|
"SameUrlAlreadyExist": "نفس عنوان الموقع موجود بالفعل إذا كنت تريد إضافة هذه المقالة ، يجب عليك تغيير عنوانها!", |
||||
|
"UrlIsNotValid": "عنوان الموقع غير صحيح.", |
||||
|
"UrlNotFound": "عنوان الموقع غير موجود.", |
||||
|
"UrlContentNotFound": "محتوى الموقع غير موجود.", |
||||
|
"Summary": "الخلاصة", |
||||
|
"MostRead": "الأكثر قراءة", |
||||
|
"Latest": "آخر", |
||||
|
"ContributeAbpCommunity": "المساهمة في مجتمع ABP", |
||||
|
"SubmitYourArticle": "إرسال مقالتك", |
||||
|
"ContributionGuide": "دليل المساهمة", |
||||
|
"BugReport": "الإبلاغ عن خطأ", |
||||
|
"SeeAllArticles": "انظر جميع المقالات", |
||||
|
"WelcomeToABPCommunity!": "مرحبًا بك في مجتمع ABP!", |
||||
|
"MyProfile": "ملفى", |
||||
|
"MyOrganizations": "منظماتي", |
||||
|
"EmailNotValid": "من فضلك أدخل بريد أليكترونى صحيح.", |
||||
|
"FeatureRequest": "طلب خاصية جديدة", |
||||
|
"CreateArticleTitleInfo": "عنوان المقال الذي سيظهر في قائمة المقالات.", |
||||
|
"CreateArticleUrlInfo": "الأصل GitHub / عنوان URL خارجي للمقالة.", |
||||
|
"CreateArticleSummaryInfo": "ملخص قصير للمقال ليتم عرضه في قائمة المقالات.", |
||||
|
"CreateArticleCoverInfo": "لإنشاء مقال فعال ، أضف صورة غلاف. لن يتم قبول سوى صور بنسبة عرض إلى ارتفاع تبلغ 9:16!", |
||||
|
"ThisExtensionIsNotAllowed": "امتداد الملف غير مسموح.", |
||||
|
"TheFileIsTooLarge": "مسار الملف طويل جداً", |
||||
|
"GoToTheArticle": "الذهاب للمقال", |
||||
|
"Contribute": "ساهم", |
||||
|
"OverallProgress": "التقدم الكلى", |
||||
|
"Done": "تم", |
||||
|
"Open": "افتح", |
||||
|
"Closed": "أُغلق", |
||||
|
"LatestQuestionOnThe": "آخر سؤال فى", |
||||
|
"Stackoverflow": "Stackoverflow", |
||||
|
"Votes": "تصويتات", |
||||
|
"Answer": "إجابة", |
||||
|
"Views": "مشاهدة", |
||||
|
"Answered": "تمت الإجابة عنه", |
||||
|
"WaitingForYourAnswer": "بانتظار إجابتك", |
||||
|
"Asked": "تم السؤال", |
||||
|
"AllQuestions": "كل الأسئلة", |
||||
|
"NextVersion": "الإصدار القادم", |
||||
|
"MilestoneErrorMessage": "تعذر الحصول على تفاصيل المعالم الحالية من Github.", |
||||
|
"QuestionItemErrorMessage": "تعذر الحصول على أحدث تفاصيل السؤال من Stackoverflow.", |
||||
|
"Oops": "عفواً!", |
||||
|
"CreateArticleSuccessMessage": "تم تقديم المقال بنجاح. سيتم نشره بعد مراجعة من إدارة الموقع.", |
||||
|
"ChooseCoverImage": "اختر صورة الغلاف...", |
||||
|
"CoverImage": "صورة الغلاف", |
||||
|
"ShareYourExperiencesWithTheABPFramework": "شارك خبراتك مع إطار عمل برنامج ABP!", |
||||
|
"Optional": "اختيارى" |
||||
|
} |
||||
|
} |
||||
@ -1,64 +1,89 @@ |
|||||
{ |
{ |
||||
"culture": "zh-Hans", |
"culture": "zh-Hans", |
||||
"texts": { |
"texts": { |
||||
"Permission:CommunityArticle": "社区文章", |
"Permission:CommunityArticle": "社区文章", |
||||
"Permission:Edit": "修改", |
"Permission:Edit": "修改", |
||||
"Waiting": "等待中", |
"Waiting": "等待中", |
||||
"Approved": "已批准", |
"Approved": "已批准", |
||||
"Rejected": "已拒绝", |
"Rejected": "已拒绝", |
||||
"Wait": "等待", |
"Wait": "等待", |
||||
"Approve": "批准", |
"Approve": "批准", |
||||
"Reject": "拒绝", |
"Reject": "拒绝", |
||||
"ReadArticle": "阅读文章", |
"ReadArticle": "阅读文章", |
||||
"Status": "状态", |
"Status": "状态", |
||||
"ContentSource": "内容来源", |
"ContentSource": "内容来源", |
||||
"Details": "详情", |
"Details": "详情", |
||||
"Url": "url", |
"Url": "url", |
||||
"Title": "标题", |
"Title": "标题", |
||||
"CreationTime": "创建时间", |
"CreationTime": "创建时间", |
||||
"Save": "保存", |
"Save": "保存", |
||||
"SameUrlAlreadyExist": "url已存在,如果你想要添加这篇文章,你需要更改url!", |
"SameUrlAlreadyExist": "url已存在,如果你想要添加这篇文章,你需要更改url!", |
||||
"UrlIsNotValid": "Url无效.", |
"UrlIsNotValid": "Url无效.", |
||||
"UrlNotFound" : "Url未找到.", |
"UrlNotFound": "Url未找到.", |
||||
"UrlContentNotFound": "Url内容未找到.", |
"UrlContentNotFound": "Url内容未找到.", |
||||
"Summary": "摘要", |
"Summary": "摘要", |
||||
"MostRead": "阅读最多", |
"MostRead": "阅读最多", |
||||
"Latest": "最新", |
"Latest": "最新", |
||||
"ContributeAbpCommunity": "为ABP社区做贡献", |
"ContributeAbpCommunity": "为ABP社区做贡献", |
||||
"SubmitYourArticle": "提交你的文章", |
"SubmitYourArticle": "提交你的文章", |
||||
"ContributionGuide": "贡献指南", |
"ContributionGuide": "贡献指南", |
||||
"BugReport": "Bug报告", |
"BugReport": "Bug报告", |
||||
"SeeAllArticles": "查看所有的文章", |
"SeeAllArticles": "查看所有的文章", |
||||
"WelcomeToABPCommunity!": "欢迎来到ABP社区!", |
"WelcomeToABPCommunity!": "欢迎来到ABP社区!", |
||||
"MyProfile": "我的资料", |
"MyProfile": "我的资料", |
||||
"MyOrganizations": "我的组织", |
"MyOrganizations": "我的组织", |
||||
"EmailNotValid": "请输入有效的电子邮箱地址.", |
"EmailNotValid": "请输入有效的电子邮箱地址.", |
||||
"FeatureRequest": "功能请求", |
"FeatureRequest": "功能请求", |
||||
"CreateArticleTitleInfo": "文章标题显示在文章列表中.", |
"CreateArticleTitleInfo": "文章标题显示在文章列表中.", |
||||
"CreateArticleUrlInfo": "文章的原始GitHub/外部URL.", |
"CreateArticleUrlInfo": "文章的原始GitHub/外部URL.", |
||||
"CreateArticleSummaryInfo": "文章的简短摘要将显示在文章列表中.", |
"CreateArticleSummaryInfo": "文章的简短摘要将显示在文章列表中.", |
||||
"CreateArticleCoverInfo": "为了创建有效的文章,请添加封面图. 仅支持16:9的图片!", |
"CreateArticleCoverInfo": "为了创建有效的文章,请添加封面图. 仅支持16:9的图片!", |
||||
"ThisExtensionIsNotAllowed": "不允许此扩展名.", |
"ThisExtensionIsNotAllowed": "不允许此扩展名.", |
||||
"TheFileIsTooLarge": "文件过大.", |
"TheFileIsTooLarge": "文件过大.", |
||||
"GoToTheArticle": "转到文章", |
"GoToTheArticle": "转到文章", |
||||
"Contribute": "贡献", |
"Contribute": "贡献", |
||||
"OverallProgress": "总体流程", |
"OverallProgress": "总体流程", |
||||
"Done": "完成", |
"Done": "完成", |
||||
"Open": "打开", |
"Open": "打开", |
||||
"Closed": "关闭", |
"Closed": "关闭", |
||||
"LatestQuestionOnThe": "有关的最新问题", |
"LatestQuestionOnThe": "有关的最新问题", |
||||
"Stackoverflow": "Stackoverflow", |
"Stackoverflow": "Stackoverflow", |
||||
"Votes": "票数", |
"Votes": "票数", |
||||
"Answer": "回答", |
"Answer": "回答", |
||||
"Views": "观看次数", |
"Views": "观看次数", |
||||
"Answered": "已回答", |
"Answered": "已回答", |
||||
"WaitingForYourAnswer": "等待你的回答", |
"WaitingForYourAnswer": "等待你的回答", |
||||
"Asked": "提问", |
"Asked": "提问", |
||||
"AllQuestions": "所有的问题", |
"AllQuestions": "所有的问题", |
||||
"NextVersion": "下一个版本", |
"NextVersion": "下一个版本", |
||||
"MilestoneErrorMessage": "无法从Github获取当前的里程碑详细信息.", |
"MilestoneErrorMessage": "无法从Github获取当前的里程碑详细信息.", |
||||
"QuestionItemErrorMessage": "无法从Stackoverflow获取最新的问题详细信息.", |
"QuestionItemErrorMessage": "无法从Stackoverflow获取最新的问题详细信息.", |
||||
"Oops": "哎呀!" |
"Oops": "哎呀!", |
||||
} |
"CreateArticleSuccessMessage": "文章提交成功. 网站管理员审核通过后将被发布.", |
||||
|
"ChooseCoverImage": "选项一张封面图片", |
||||
|
"CoverImage": "封面图片", |
||||
|
"ShareYourExperiencesWithTheABPFramework": "分享你的ABP Framework经验!", |
||||
|
"Optional": "可选的", |
||||
|
"UpdateUserWebSiteInfo": "示例: https://johndoe.com", |
||||
|
"UpdateUserTwitterInfo": "示例: johndoe", |
||||
|
"UpdateUserGithubInfo": "示例: johndoe", |
||||
|
"UpdateUserLinkedinInfo": "示例: https://www.linkedin.com/...", |
||||
|
"UpdateUserCompanyInfo": "示例v: Volosoft", |
||||
|
"UpdateUserJobTitleInfo": "示例: Software Developer", |
||||
|
"UserName": "用户名", |
||||
|
"Company": "公司", |
||||
|
"PersonalWebsite": "个人网站", |
||||
|
"RegistrationDate": "注册时间", |
||||
|
"Social": "社交", |
||||
|
"Biography": "传记", |
||||
|
"HasNoPublishedArticlesYet": "尚未发表文章", |
||||
|
"Author": "作者", |
||||
|
"LatestGithubAnnouncements": "最新的Github公告", |
||||
|
"SeeAllAnnouncements": "查看所有公告", |
||||
|
"LatestBlogPost": "最新博客文章", |
||||
|
"Edit": "修改", |
||||
|
"ProfileImageChange": "更改资料图片", |
||||
|
"BlogItemErrorMessage": "无法从ABP获取最新的博客文章详细信息.", |
||||
|
"PlannedReleaseDate": "计划发布日期" |
||||
} |
} |
||||
|
} |
||||
@ -0,0 +1,161 @@ |
|||||
|
{ |
||||
|
"culture": "ar", |
||||
|
"texts": { |
||||
|
"GetStarted": "ابدأ - قوالب بدء التشغيل", |
||||
|
"Create": "إنشاء", |
||||
|
"NewProject": "مشروع جديد", |
||||
|
"DirectDownload": "تحميل مباشر", |
||||
|
"ProjectName": "اسم المشروع", |
||||
|
"ProjectType": "نوع المشروع", |
||||
|
"DatabaseProvider": "مزود قاعدة البيانات", |
||||
|
"NTier": "N- الطبقة", |
||||
|
"IncludeUserInterface": "تشمل واجهة المستخدم", |
||||
|
"CreateNow": "إنشاء جديد", |
||||
|
"TheStartupProject": "مشروع بدء التشغيل", |
||||
|
"Tutorial": "الدورة التعليمية", |
||||
|
"UsingCLI": "باستخدام CLI", |
||||
|
"SeeDetails": "انظر التفاصيل", |
||||
|
"AbpShortDescription": "ABP Framework بنية أساسية كاملة لإنشاء تطبيقات ويب حديثة باتباع أفضل ممارسات واتفاقيات تطوير البرامج.", |
||||
|
"SourceCodeUpper": "شفرة المصدر", |
||||
|
"LatestReleaseLogs": "أحدث سجلات الإصدار", |
||||
|
"Infrastructure": "البنية التحتية", |
||||
|
"Architecture": "الهيكلة", |
||||
|
"Modular": "معياري", |
||||
|
"DontRepeatYourself": "لا تكرر نفسك", |
||||
|
"DeveloperFocused": "تركيز المطور", |
||||
|
"FullStackApplicationInfrastructure": "البنية التحتية الكاملة للتطبيق.", |
||||
|
"DomainDrivenDesign": "Domain Driven Design", |
||||
|
"DomainDrivenDesignExplanation": "تم تصميمه وتطويره بناءً على أنماط ومبادئ DDD. يوفر نموذجًا متعدد الطبقات لتطبيقك.", |
||||
|
"Authorization": "تفويض", |
||||
|
"AuthorizationExplanation": "إذن متقدم مع نظام أذونات مستخدم ودور ودقيق. مبني على مكتبة هوية Microsoft.", |
||||
|
"MultiTenancy": "متعدد الايجار", |
||||
|
"MultiTenancyExplanationShort": "جعلت تطبيقات SaaS سهلة! متعدد الإيجارات المتكاملة من قاعدة البيانات إلى واجهة المستخدم.", |
||||
|
"CrossCuttingConcerns": "اهتمامات مشتركة", |
||||
|
"CrossCuttingConcernsExplanationShort": "بنية تحتية كاملة للتفويض والتحقق من الصحة ومعالجة الاستثناءات والتخزين المؤقت وتسجيل التدقيق وإدارة المعاملات والمزيد.", |
||||
|
"BuiltInBundlingMinification": "تجميع وتصغير مدمج", |
||||
|
"BuiltInBundlingMinificationExplanation": "لا حاجة لاستخدام أدوات خارجية للتجميع والتصغير. تقدم ABP طريقة أبسط وديناميكية وقوية ومتكاملة ومدمجة!", |
||||
|
"VirtualFileSystem": "نظام الملفات الافتراضي", |
||||
|
"VirtualFileSystemExplanation": "قم بتضمين العروض والنصوص والأنماط والصور ... في الحزم / المكتبات وإعادة استخدامها في تطبيقات مختلفة.", |
||||
|
"Theming": "تصميم", |
||||
|
"ThemingExplanationShort": "استخدم وتخصيص سمة واجهة المستخدم القياسية القائمة على التمهيد أو قم بإنشاء سمة خاصة بك.", |
||||
|
"BootstrapTagHelpersDynamicForms": "أدوات مساعدة علامة التمهيد والنماذج الديناميكية", |
||||
|
"BootstrapTagHelpersDynamicFormsExplanation": "بدلاً من كتابة التفاصيل المتكررة لمكونات التمهيد يدويًا ، استخدم مساعدي علامات ABP لتبسيطها والاستفادة من التحسس. أنشئ نماذج واجهة مستخدم بسرعة استنادًا إلى نموذج C # باستخدام مساعد علامة النموذج الديناميكي.", |
||||
|
"HTTPAPIsDynamicProxies": "HTTP APIs & Dynamic Proxies", |
||||
|
"HTTPAPIsDynamicProxiesExplanation": "كشف خدمات التطبيقات تلقائيًا على أنها واجهات برمجة تطبيقات HTTP بنمط REST ، واستهلكها باستخدام وكلاء JavaScript و C # الديناميكيين.", |
||||
|
"CompleteArchitectureInfo": "هندسة معمارية حديثة لإنشاء حلول برمجية قابلة للصيانة.", |
||||
|
"DomainDrivenDesignBasedLayeringModelExplanation": "يساعدك على تنفيذ بنية طبقات تستند إلى DDD وبناء قاعدة رمز قابلة للصيانة.", |
||||
|
"DomainDrivenDesignBasedLayeringModelExplanationCont": "يوفر قوالب بدء التشغيل ، والملخصات ، والفئات الأساسية ، والخدمات ، والوثائق والأدلة لمساعدتك على تطوير تطبيقك بناءً على أنماط ومبادئ DDD.", |
||||
|
"MicroserviceCompatibleModelExplanation": "تم تصميم إطار العمل الأساسي ووحدات ما قبل الإنشاء مع مراعاة بنية الخدمات المصغرة.", |
||||
|
"MicroserviceCompatibleModelExplanationCont": "يوفر البنية التحتية وعمليات الدمج والعينات والوثائق لتنفيذ حلول الخدمات المصغرة بشكل أسهل ، في حين أنه لا يجلب تعقيدًا إضافيًا إذا كنت تريد تطبيقًا مترابطًا.", |
||||
|
"ModularInfo": "يوفر ABP نظام وحدة نمطية يسمح لك بتطوير وحدات تطبيق قابلة لإعادة الاستخدام ، والربط بأحداث دورة حياة التطبيق ، والتعبير عن التبعيات بين الأجزاء الأساسية في نظامك.", |
||||
|
"PreBuiltModulesThemes": "الوحدات والسمات المبنية مسبقًا", |
||||
|
"PreBuiltModulesThemesExplanation": "الوحدات والسمات مفتوحة المصدر والتجارية جاهزة للاستخدام في تطبيق عملك.", |
||||
|
"NuGetNPMPackages": "حزم NuGet و NPM", |
||||
|
"NuGetNPMPackagesExplanation": "توزع كحزم NuGet و NPM. سهل التركيب والترقية.", |
||||
|
"ExtensibleReplaceable": "قابل للتوسيع / قابل للاستبدال", |
||||
|
"ExtensibleReplaceableExplanation": "تم تصميم جميع الخدمات والوحدات النمطية في الاعتبار قابلية التوسع. يمكنك استبدال الخدمات والصفحات والأنماط والمكونات.", |
||||
|
"CrossCuttingConcernsExplanation2": "اجعل قاعدة الشفرة أصغر حتى تتمكن من التركيز على الكود الخاص بنشاطك التجاري.", |
||||
|
"CrossCuttingConcernsExplanation3": "لا ترسل وقتًا لتنفيذ متطلبات التطبيق المشتركة في مشاريع متعددة.", |
||||
|
"AuthenticationAuthorization": "المصادقة والتفويض", |
||||
|
"ExceptionHandling": "معالجة الاستثناء", |
||||
|
"Validation": "التحقق من الصحة", |
||||
|
"DatabaseConnection": "اتصال قاعدة البيانات", |
||||
|
"TransactionManagement": "إدارة المعاملات", |
||||
|
"AuditLogging": "تدوين التسجيل", |
||||
|
"Caching": "التخزين المؤقت", |
||||
|
"Multitenancy": "التعددية", |
||||
|
"DataFiltering": "تصفية البيانات", |
||||
|
"ConventionOverConfiguration": "اتفاقية على التكوين", |
||||
|
"ConventionOverConfigurationExplanation": "تنفذ ABP اصطلاحات التطبيق الشائعة افتراضيًا باستخدام الحد الأدنى من التكوين أو صفر.", |
||||
|
"ConventionOverConfigurationExplanationList1": "التسجيل التلقائى للخدمات المعروفة بحقن التبعية.", |
||||
|
"ConventionOverConfigurationExplanationList2": "يعرض خدمات التطبيقات على أنها واجهات برمجة تطبيقات HTTP من خلال اصطلاحات التسمية.", |
||||
|
"ConventionOverConfigurationExplanationList3": "يقوم بإنشاء وكلاء عميل HTTP ديناميكي لـ C # و JavaScript.", |
||||
|
"ConventionOverConfigurationExplanationList4": "يوفر المستودعات الافتراضية للكيانات الخاصة بك.", |
||||
|
"ConventionOverConfigurationExplanationList5": "إدارة وحدة العمل حسب طلب الويب أو طريقة خدمة التطبيق.", |
||||
|
"ConventionOverConfigurationExplanationList6": "ينشر إنشاء وتحديث وحذف الأحداث للكيانات الخاصة بك.", |
||||
|
"BaseClasses": "الفئات الأساسية", |
||||
|
"BaseClassesExplanation": "فئات أساسية مسبقة الصنع لأنماط التطبيق الشائعة.", |
||||
|
"DeveloperFocusedExplanation": "ABP للمطورين.", |
||||
|
"DeveloperFocusedExplanationCont": "يهدف إلى تبسيط عملية تطوير البرامج اليومية مع عدم تقييدك من كتابة رمز منخفض المستوى.", |
||||
|
"SeeAllFeatures": "انظر جميع الميزات", |
||||
|
"CLI_CommandLineInterface": "CLI (واجهة سطر الأوامر)", |
||||
|
"CLI_CommandLineInterfaceExplanation": "يتضمن CLI لمساعدتك على أتمتة إنشاء مشاريع جديدة وإضافة وحدات نمطية جديدة.", |
||||
|
"StartupTemplates": "قوالب بدء التشغيل", |
||||
|
"StartupTemplatesExplanation": "توفر قوالب بدء التشغيل المختلفة حلاً مهيئًا بالكامل لبدء التطوير السريع.", |
||||
|
"BasedOnFamiliarTools": "بناءاً على أدوات معروفة", |
||||
|
"BasedOnFamiliarToolsExplanation": "مصمم ومتكامل مع الأدوات الشائعة التي تعرفها بالفعل. منحنى تعليمي منخفض ، سهل التكيف ، تنمية مريحة.", |
||||
|
"ORMIndependent": "ORM مستقل", |
||||
|
"ORMIndependentExplanation": "الإطار الأساسي هو ORM / قاعدة البيانات مستقل ويمكن أن يعمل مع أي مصدر بيانات. يتوفر مقدمو Entity Framework Core و MongoDB بالفعل.", |
||||
|
"Features": "استكشف ميزات إطار عمل ABP", |
||||
|
"ABPCLI": "ABP CLI", |
||||
|
"Modularity": "النمطية", |
||||
|
"BootstrapTagHelpers": "مساعدي علامة التمهيد", |
||||
|
"DynamicForms": "شاشات ديناميكية", |
||||
|
"BundlingMinification": "التجميع والتصغير", |
||||
|
"BackgroundJobs": "وظائف الخلفية", |
||||
|
"DDDInfrastructure": "البنية التحتية DDD", |
||||
|
"DomainDrivenDesignInfrastructure": "البنية التحتية للتصميم يحركها المجال", |
||||
|
"AutoRESTAPIs": "واجهات برمجة تطبيقات Auto REST", |
||||
|
"DynamicClientProxies": "وكلاء العميل الديناميكي", |
||||
|
"DistributedEventBus": "حافلة الحدث الموزعة", |
||||
|
"DistributedEventBusWithRabbitMQIntegration": "حافلة الحدث الموزعة مع تكامل RabbitMQ", |
||||
|
"TestInfrastructure": "اختبار البنية التحتية", |
||||
|
"AuditLoggingEntityHistories": "سجل التدقيق وتاريخ الكيان", |
||||
|
"ObjectToObjectMapping": "مطابقة كائن إلى كائن", |
||||
|
"EmailSMSAbstractions": "التجريد من البريد الإلكتروني والرسائل النصية القصيرة", |
||||
|
"EmailSMSAbstractionsWithTemplatingSupport": "تجريدات البريد الإلكتروني والرسائل النصية القصيرة مع دعم القوالب", |
||||
|
"Localization": "التعريب", |
||||
|
"SettingManagement": "إدارة الإعدادات", |
||||
|
"ExtensionMethods": "طرق التمديد", |
||||
|
"ExtensionMethodsHelpers": "طرق التمديد والمساعدين", |
||||
|
"AspectOrientedProgramming": "البرمجة الموجهة", |
||||
|
"DependencyInjection": "حقن التبعية", |
||||
|
"DependencyInjectionByConventions": "حقن التبعية بالاتفاقيات", |
||||
|
"ABPCLIExplanation": "ABP CLI (واجهة سطر الأوامر) هي أداة سطر أوامر لإجراء بعض العمليات الشائعة للحلول المستندة إلى ABP.", |
||||
|
"ModularityExplanation": "يوفر ABP بنية أساسية كاملة لبناء وحدات التطبيق الخاصة بك والتي قد تحتوي على كيانات وخدمات وتكامل قواعد البيانات وواجهات برمجة التطبيقات ومكونات واجهة المستخدم وما إلى ذلك ..", |
||||
|
"MultiTenancyExplanation": "لا يدعم إطار عمل ABP تطوير التطبيقات متعددة المستأجرين فحسب ، بل يجعل الكود الخاص بك في الغالب غير مدرك للتعددية المستأجرة.", |
||||
|
"MultiTenancyExplanation2": "يمكن تحديد المستأجر الحالي تلقائيًا ، وعزل بيانات المستأجرين المختلفين عن بعضهم البعض.", |
||||
|
"MultiTenancyExplanation3": "يدعم قاعدة بيانات واحدة وقاعدة بيانات لكل مستأجر ونهج مختلطة.", |
||||
|
"MultiTenancyExplanation4": "أنت تركز على رمز عملك وتدع إطار العمل للتعامل مع عقود الإيجار المتعددة نيابة عنك.", |
||||
|
"BootstrapTagHelpersExplanation": "بدلاً من كتابة التفاصيل المتكررة لمكونات التمهيد يدويًا ، استخدم مساعدي علامات ABP لتبسيطها والاستفادة من التحسس. يمكنك بالتأكيد استخدام Bootstrap متى احتجت إليه.", |
||||
|
"DynamicFormsExplanation": "يمكن لمساعدي النموذج الديناميكي وعلامات الإدخال إنشاء النموذج الكامل من فئة C # كنموذج.", |
||||
|
"AuthenticationAuthorizationExplanation": "خيارات المصادقة والترخيص الغنية المدمجة في ASP.NET Core Identity & IdentityServer4. يوفر نظام إذن موسع ومفصل.", |
||||
|
"CrossCuttingConcernsExplanation": "لا تكرر نفسك لتنفيذ كل هذه الأشياء الشائعة مرارًا وتكرارًا. ركز على رمز عملك ودع برنامج ABP يقوم بأتمتة ذلك من خلال الاتفاقيات.", |
||||
|
"DatabaseConnectionTransactionManagement": "اتصال قاعدة البيانات وإدارة المعاملات", |
||||
|
"CorrelationIdTracking": "تتبع معرف الارتباط", |
||||
|
"BundlingMinificationExplanation": "تقدم ABP نظام تجميع وتقليل بسيط وديناميكي وقوي ونمطي ومدمج.", |
||||
|
"VirtualFileSystemnExplanation": "يتيح نظام الملفات الظاهري إدارة الملفات غير الموجودة فعليًا على نظام الملفات (القرص). يتم استخدامه بشكل أساسي لتضمين ملفات (js ، css ، image ، cshtml ...) في التجميعات واستخدامها مثل الملفات الفعلية في وقت التشغيل.", |
||||
|
"ThemingExplanation": "يسمح نظام Theming بتطوير سمة التطبيق والوحدات النمطية الخاصة بك بشكل مستقل عن طريق تحديد مجموعة من المكتبات الأساسية المشتركة والتخطيطات ، بناءً على أحدث إطار عمل Bootstrap.", |
||||
|
"DomainDrivenDesignInfrastructureExplanation": "بنية تحتية كاملة لإنشاء تطبيقات متعددة الطبقات بناءً على أنماط ومبادئ التصميم المدفوع بالمجال ؛", |
||||
|
"Specification": "تخصيص", |
||||
|
"Repository": "مخزن", |
||||
|
"DomainService": "خدمة المجال", |
||||
|
"ValueObject": "كائن القيمة", |
||||
|
"ApplicationService": "خدمة التطبيق", |
||||
|
"DataTransferObject": "كائن نقل البيانات", |
||||
|
"AggregateRootEntity": "تجميع الجذر والكيان", |
||||
|
"AutoRESTAPIsExplanation": "يمكن لـ ABP تكوين خدمات التطبيقات الخاصة بك تلقائيًا كوحدات تحكم API حسب الاصطلاح.", |
||||
|
"DynamicClientProxiesExplanation": "استهلك واجهات برمجة التطبيقات الخاصة بك بسهولة من عملاء JavaScript و C#.", |
||||
|
"DistributedEventBusWithRabbitMQIntegrationExplanation": "انشر واستهلك الأحداث الموزعة بسهولة باستخدام ناقل الأحداث الموزع المدمج مع توفر تكامل RabbitMQ.", |
||||
|
"TestInfrastructureExplanation": "تم تطوير إطار العمل واختبار الوحدة والتكامل في الاعتبار. يوفر لك الفئات الأساسية لتسهيل الأمر. تأتي قوالب بدء التشغيل مع تكوين مسبق للاختبار.", |
||||
|
"AuditLoggingEntityHistoriesExplanation": "تسجيل تدقيق مدمج للتطبيقات المهمة للأعمال. الطلب والخدمة وتسجيل التدقيق على مستوى الطريقة وتاريخ الكيان مع تفاصيل مستوى الملكية.", |
||||
|
"EmailSMSAbstractionsWithTemplatingSupportExplanation": "تفصل تجريدات IEmailSender و ISmsSender منطق التطبيق الخاص بك عن البنية التحتية. يسمح نظام قوالب البريد الإلكتروني المتقدم بإنشاء قوالب البريد الإلكتروني وتعريبها واستخدامها بسهولة عند الحاجة.", |
||||
|
"LocalizationExplanation": "يسمح نظام التعريب بإنشاء موارد في ملفات JSON عادية واستخدامها لتعريب واجهة المستخدم الخاصة بك. وهو يدعم السيناريوهات المتقدمة مثل الوراثة والإضافات وتكامل JavaScript بينما يتوافق تمامًا مع نظام توطين AspNet Core.", |
||||
|
"SettingManagementExplanation": "حدد إعدادات التطبيق الخاص بك واحصل على القيم في وقت التشغيل بناءً على التكوين الحالي والمستأجر والمستخدم.", |
||||
|
"ExtensionMethodsHelpersExplanation": "لا تكرر نفسك حتى مع أجزاء التعليمات البرمجية البسيطة. الإضافات والمساعدات للأنواع القياسية تجعل التعليمات البرمجية أكثر وضوحًا وسهولة في الكتابة.", |
||||
|
"AspectOrientedProgrammingExplanation": "يوفر بنية تحتية مريحة لإنشاء وكلاء ديناميكيين وتنفيذ البرمجة الموجهة نحو الجانب. اعترض أي فئة وقم بتنفيذ التعليمات البرمجية الخاصة بك قبل وبعد تنفيذ كل طريقة.", |
||||
|
"DependencyInjectionByConventionsExplanation": "لا حاجة لتسجيل فصولك في حقن التبعية يدويًا. يسجل تلقائيًا أنواع الخدمات الشائعة حسب الاصطلاح. بالنسبة لأنواع الخدمات الأخرى ، يمكنك استخدام الواجهات والسمات لتسهيل الأمر ووضعه في مكانه.", |
||||
|
"DataFilteringExplanation": "تحديد واستخدام عوامل تصفية البيانات التي يتم تطبيقها تلقائيًا عند الاستعلام عن الكيانات من قاعدة البيانات. يتم توفير مرشحات Soft Delete & MultiTenant خارج الصندوق عند تنفيذ واجهات بسيطة.", |
||||
|
"PublishEvents": "نشر الأحداث", |
||||
|
"HandleEvents": "معالجة الأحداث", |
||||
|
"AndMore": "وأكثر من ذلك ...", |
||||
|
"Code": "شفرة", |
||||
|
"Result": "النتيجة", |
||||
|
"SeeTheDocumentForMoreInformation": "راجع الـ <a href=\"{1}\">{0} الوثيقة</a> لمزيد من المعلومات", |
||||
|
"IndexPageHeroSection": "<span class=\"first-line shine\"><strong>فتح المصدر</strong></span><span class=\"second-line text-uppercase\">تطبيق الويب<br />إطار </span><span class=\"third-line shine2\"><strong>لـ asp.net core</strong></span>", |
||||
|
"UiFramework": "إطار عمل واجهة المستخدم", |
||||
|
"EmailAddress": "البريد الإلكترونى", |
||||
|
"Mobile": "المحمول", |
||||
|
"ReactNative": "React Native" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
{ |
||||
|
"grammarly.userWords": [ |
||||
|
"api", |
||||
|
"apiName", |
||||
|
"cli", |
||||
|
"defaultProject", |
||||
|
"formatter", |
||||
|
"md", |
||||
|
"monorepo", |
||||
|
"ngsw", |
||||
|
"npx", |
||||
|
"pwa", |
||||
|
"rootNamespace" |
||||
|
] |
||||
|
} |
||||
@ -0,0 +1,262 @@ |
|||||
|
# ABP Framework & ABP Commercial 3.2 RC With The New Blazor UI |
||||
|
|
||||
|
We are extremely excited today to release the [ABP Framework](https://abp.io/) Release Candidate (and the [ABP Commercial](https://commercial.abp.io/), as always). This release includes an early preview version of the **Blazor UI** for the ABP.IO Platform. |
||||
|
|
||||
|
## The Blazor UI |
||||
|
|
||||
|
While the Blazor UI **should be considered as experimental** for now, it is possible to start to develop your application today. |
||||
|
|
||||
|
### Fundamental Services |
||||
|
|
||||
|
Currently, implemented some important framework features; |
||||
|
|
||||
|
* **Authentication** through the MVC backend using the OpenId Connect authorization code flow. So, all the current login options (login, register, forgot password, external/social logins...) are supported. |
||||
|
* **Authorization**, using the ABP Framework **permissions** as well as the standard authorization system. |
||||
|
* **Localization** just works like the MVC UI. |
||||
|
* **Basic Theme** with top main menu. |
||||
|
* **Dynamic C# HTTP API proxies**, so you can directly consume your backend API by injecting the application service interfaces. |
||||
|
* Some other **fundamental services** like `ISettingProvider`, `IFeatureChecker`, `ICurrentUser`... |
||||
|
|
||||
|
Also, the standard .net services are already available, like caching, logging, validation and much more. Since the ABP Framework is layered itself, all the non MVC UI related features are already usable for the Blazor UI. |
||||
|
|
||||
|
### Pre-Built Modules |
||||
|
|
||||
|
Some modules have been implemented; |
||||
|
|
||||
|
* **Identity** module is pre-installed and provides **user, role and permission management**. |
||||
|
* **Profile management** page is implemented to allow to change password and personal settings. |
||||
|
|
||||
|
### About the Blazorise Library |
||||
|
|
||||
|
We've selected the [Blazorise](https://blazorise.com/) as a fundamental UI library for the Blazor UI. It already supports different HTML/CSS frameworks (like Bootstrap, Bulma, Ant Design...) and significantly increases the developer productivity. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
We also have a good news: **[Mladen Macanović](https://github.com/stsrki)**, the creator of the Blazorise, is **joining to the core ABP Framework team** in the next weeks. We are excited to work with him to bring the power of these two successful projects together. |
||||
|
|
||||
|
### The Tutorial |
||||
|
|
||||
|
We've **updated** the [web application development tutorial](https://docs.abp.io/en/abp/3.2/Tutorials/Part-1?UI=Blazor) for the **Blazor UI**. You can start to develop applications today! The **source code** of the BookStore application developed with this tutorial is [here](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore). |
||||
|
|
||||
|
### Get started with the Blazor UI |
||||
|
|
||||
|
If you want to try the Blazor UI today, follow the instructions below. |
||||
|
|
||||
|
#### Upgrade the ABP CLI |
||||
|
|
||||
|
Install the latest [ABP CLI](https://docs.abp.io/en/abp/3.2/CLI) preview version: |
||||
|
|
||||
|
````bash |
||||
|
dotnet tool update Volo.Abp.Cli -g --version 3.2.0-rc.2 |
||||
|
```` |
||||
|
|
||||
|
#### Create a new Solution |
||||
|
|
||||
|
Then you can create a new solution using the *abp new* command: |
||||
|
|
||||
|
````bash |
||||
|
abp new AbpBlazorDemo -u blazor --preview |
||||
|
```` |
||||
|
|
||||
|
Also specify the `-t app-pro` parameter if you are an ABP Commercial user. |
||||
|
|
||||
|
> See the ABP CLI documentation for the additional options, like MongoDB database or separated authentication server. |
||||
|
|
||||
|
#### Open the Solution |
||||
|
|
||||
|
Open the generated solution using the latest Visual Studio 2019. You will see a solution structure like the picture below: |
||||
|
|
||||
|
 |
||||
|
|
||||
|
#### Run the Application |
||||
|
|
||||
|
* Run the `DbMigrator` project to create the database and seed the initial data. |
||||
|
* Run the `HttpApi.Host` project for the server side. |
||||
|
* Run the `Blazor` project to start the Blazor UI. |
||||
|
|
||||
|
Use `admin` as the username and `1q2w3E*` as the password to login to the application. |
||||
|
|
||||
|
Here, a screenshot from the role management page of the Blazor UI: |
||||
|
|
||||
|
 |
||||
|
|
||||
|
## What's New with the ABP Framework 3.2 |
||||
|
|
||||
|
Beside the Blazor UI, there are a lot of issues have been closed with [the milestone 3.2](https://github.com/abpframework/abp/milestone/39?closed=1). I will highlight some of the major features and changes released with this version. |
||||
|
|
||||
|
### MongoDB ACID Transactions |
||||
|
|
||||
|
[MongoDB integration](https://docs.abp.io/en/abp/3.2/MongoDB) now supports multi-document transactions that comes with the MongoDB 4.x. |
||||
|
|
||||
|
We've **disabled transactions** for solutions use the MongoDB, inside the `YourProjectMongoDbModule.cs` file in the MongoDB project. If your MongoDB server **supports transactions**, you should manually enable it in this class: |
||||
|
|
||||
|
```csharp |
||||
|
Configure<AbpUnitOfWorkDefaultOptions>(options => |
||||
|
{ |
||||
|
options.TransactionBehavior = UnitOfWorkTransactionBehavior.Auto; |
||||
|
}); |
||||
|
``` |
||||
|
|
||||
|
> Or you can delete this code since this is already the default behavior. |
||||
|
|
||||
|
#### Upgrade Notes |
||||
|
|
||||
|
If you are upgrading an existing solution and your MongoDB server doesn't support transactions, please disable it: |
||||
|
|
||||
|
```csharp |
||||
|
Configure<AbpUnitOfWorkDefaultOptions>(options => |
||||
|
{ |
||||
|
options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled; |
||||
|
}); |
||||
|
``` |
||||
|
|
||||
|
See the [Unit Of Work document](https://docs.abp.io/en/abp/3.2/Unit-Of-Work) to learn more about UOW and transactions. |
||||
|
|
||||
|
Also, add [this file](https://github.com/abpframework/abp/blob/rel-3.2/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.MongoDB/MongoDb/MongoDbMyProjectNameDbSchemaMigrator.cs) into your MongoDB project (remember to change `MongoDbMyProjectNameDbSchemaMigrator` and `IMyProjectNameDbSchemaMigrator` with your own project name). |
||||
|
|
||||
|
#### Integration Tests |
||||
|
|
||||
|
> Transactions are also **disabled for automated integration tests** coming with the application startup template, since the [Mongo2Go](https://github.com/Mongo2Go/Mongo2Go) library (we use in the test projects) has a problem with the transactions. We've sent a [Pull Request](https://github.com/Mongo2Go/Mongo2Go/pull/101) to fix it and will enable the transactions again when they merge & release it. |
||||
|
> |
||||
|
> If you are upgrading an existing solution and using MongoDB, please disable transactions for the test projects just as described above. |
||||
|
|
||||
|
### Kafka Integration for the Distributed Event Bus |
||||
|
|
||||
|
ABP Framework's [distributed event system](https://docs.abp.io/en/abp/3.2/Distributed-Event-Bus) has been [integrated to RabbitMQ](https://docs.abp.io/en/abp/3.2/Distributed-Event-Bus-RabbitMQ-Integration) before. By the version 3.2, it has a Kafka integration package, named [Volo.Abp.EventBus.Kafka](https://www.nuget.org/packages/Volo.Abp.EventBus.Kafka). |
||||
|
|
||||
|
See the [Kafka integration documentation](https://docs.abp.io/en/abp/3.2/Distributed-Event-Bus-Kafka-Integration) to learn how to install and configure it. |
||||
|
|
||||
|
### Host Features |
||||
|
|
||||
|
[ABP Feature System](https://docs.abp.io/en/abp/3.2/Features) allows you to define features in your application. Then you can enable/disable a feature dynamically on the runtime. It is generally used in a [multi-tenant](https://docs.abp.io/en/abp/3.2/Multi-Tenancy) system to restrict features for tenants, so you can charge extra money for some features in a SaaS application. |
||||
|
|
||||
|
In some cases, you may want to use the same features in the host side (host is you as you are managing the tenants). For this case, we've added a "**Manage Host Features**" button to the Tenant Management page so you can open a modal dialog to select the features for the host side. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
### AbpHttpClientBuilderOptions |
||||
|
|
||||
|
ABP Framework provides a system to dynamically create C# proxies to consume HTTP APIs from your client applications. `AbpHttpClientBuilderOptions` is a new option class to configure the `HttpClient`s used by the proxy system. |
||||
|
|
||||
|
**Example: Use the [Polly](https://github.com/App-vNext/Polly) library to retry up to 3 times for a failed HTTP request** |
||||
|
|
||||
|
````csharp |
||||
|
public override void PreConfigureServices(ServiceConfigurationContext context) |
||||
|
{ |
||||
|
PreConfigure<AbpHttpClientBuilderOptions>(options => |
||||
|
{ |
||||
|
options.ProxyClientBuildActions.Add((remoteServiceName, clientBuilder) => |
||||
|
{ |
||||
|
clientBuilder.AddTransientHttpErrorPolicy(policyBuilder => |
||||
|
policyBuilder.WaitAndRetryAsync( |
||||
|
3, |
||||
|
i => TimeSpan.FromSeconds(Math.Pow(2, i)) |
||||
|
) |
||||
|
); |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
```` |
||||
|
|
||||
|
See the issue [#5304](https://github.com/abpframework/abp/issues/5304) for the details. |
||||
|
|
||||
|
### ABP Build Command |
||||
|
|
||||
|
We are using **mono repository** approach and the [abp repository](https://github.com/abpframework/abp) has tens of solutions and hundreds of projects (the framework, modules, tooling, templates...) with all of them are referencing to each other. |
||||
|
|
||||
|
It gets a significant time to build the whole repository for every Git push. To **optimize** this process, we've created the **abp build** command in the [ABP CLI](https://docs.abp.io/en/abp/3.2/CLI): |
||||
|
|
||||
|
````bash |
||||
|
abp build |
||||
|
```` |
||||
|
|
||||
|
We will use this command to build the abp repository or a solution inside it. However it is available to everyone in case of need. |
||||
|
|
||||
|
> **Most of the people will not need it**. If you need it, see the [ABP CLI](https://docs.abp.io/en/abp/3.2/CLI) document to learn all the details and options. |
||||
|
|
||||
|
### Other Features, Improvements and Changes |
||||
|
|
||||
|
* Introduced the `DynamicRangeAttribute` that can be used to determine the range values on runtime, just like the `DynamicStringLengthAttribute` was introduced before. |
||||
|
* Improved the feature management modal for multi-tenant applications to group features on the UI and show hierarchically. |
||||
|
* Added `--skip-cli-version-check` option to ABP CLI to improve the performance by bypassing the online version check. |
||||
|
* Angular UI now redirect to MVC UI (the authentication server side) for profile management page, if the authorization code flow is used (which is the default). |
||||
|
* Account module profile management page is now extensible. You can implement the `IProfileManagementPageContributor` interface and register it using the `ProfileManagementPageOptions` class. |
||||
|
* Improvements and optimizations for the [Angular service proxy generation](https://blog.abp.io/abp/Introducing-the-Angular-Service-Proxy-Generation). |
||||
|
|
||||
|
And a lot of minor improvements and bug fixes. You can see [the milestone 3.2](https://github.com/abpframework/abp/milestone/39?closed=1) for all issues & PRs closed with this version. |
||||
|
|
||||
|
## What's New with the ABP Commercial 3.2 |
||||
|
|
||||
|
### Breaking Changes |
||||
|
|
||||
|
The new *profile picture management* feature uses the [BLOB storing](https://docs.abp.io/en/abp/3.2/Blob-Storing) system, so it needs a Storage Provider. The new **startup template comes with the [Database BLOB Provider](https://docs.abp.io/en/abp/3.2/Blob-Storing-Database) pre-installed**. You can change it if you want to use another BLOB provider (like Azure, AWS or a simple file system). |
||||
|
|
||||
|
**Existing solutions must configure a BLOB provider** after upgrading to the version 3.2. Follow the [BLOB Storing document](https://docs.abp.io/en/abp/3.2/Blob-Storing#blob-storage-providers) to configure the provider yourself. |
||||
|
|
||||
|
### The Blazor UI |
||||
|
|
||||
|
The **experimental** Blazor UI is also available for the ABP Commercial. The [Lepton Theme](https://commercial.abp.io/themes) hasn't been implemented with this initial preview, however we are working on it with the highest priority. |
||||
|
|
||||
|
You can use the [ABP Suite](https://docs.abp.io/en/commercial/latest/abp-suite/index) or the following ABP CLI command to create a new solution with the Blazor UI: |
||||
|
|
||||
|
````bash |
||||
|
abp new AbpBlazorDemo -u blazor -t app-pro --preview |
||||
|
```` |
||||
|
|
||||
|
Please try it and provide feedback to us. Thanks in advance. |
||||
|
|
||||
|
> See the instructions in the *Get started with the Blazor UI* section above to properly create and run your application. |
||||
|
|
||||
|
### File Management Angular UI |
||||
|
|
||||
|
Angular UI for the [File Management](https://commercial.abp.io/modules/Volo.FileManagement) module is available with the version 3.2. You can add it to your solution using the ABP Suite. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
### Profile Picture Management |
||||
|
|
||||
|
We've added profile picture management for the account module, so a user can select one of the options below for her profile picture; |
||||
|
|
||||
|
* Use the default placeholder as the avatar. |
||||
|
* Use [Gravatar](https://gravatar.com/) service to get the picture matching the email address of the user. |
||||
|
* Upload a file as the profile picture. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
### Two Factor Authentication Features |
||||
|
|
||||
|
Created [features](https://docs.abp.io/en/abp/3.2/Features) and [settings](https://docs.abp.io/en/abp/3.2/Settings) to disable, enable or force to use 2FA on login for the tenants and users. |
||||
|
|
||||
|
### Upgrading the ABP Suite |
||||
|
|
||||
|
You can use the following command to upgrade the ABP Suite to the latest preview version: |
||||
|
|
||||
|
```` |
||||
|
abp suite update --preview |
||||
|
```` |
||||
|
|
||||
|
## Other News |
||||
|
|
||||
|
### The ABP Community |
||||
|
|
||||
|
**ABP Community** web site is constantly being improved and new articles are added. We will add "**commenting**" and "**rating**" features to the articles soon to increase the interactivity between the people. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
If you have something to share with the ABP community or want to follow the project progress, please check the **[community.abp.io](https://community.abp.io/)**! |
||||
|
|
||||
|
### CMS Kit Project |
||||
|
|
||||
|
We are silently working on a project, named [CMS Kit](https://github.com/abpframework/abp/tree/dev/modules/cms-kit), for a few months. CMS Kit is a set of reusable CMS (Content Management System) components based on the ABP Framework. Some of the components currently being developed: |
||||
|
|
||||
|
* **Comments**; Allows users to comment under something (a blog post, a document, an image... etc). |
||||
|
* **Reactions**; Allows users to give reactions to something (a comment, a picture... etc.) using simple emoji icons. |
||||
|
* **Rating**; Allows users to rate some content from 1 to 5. |
||||
|
* **Newsletter**; Allows you to put a newsletter box to your web site to collect emails from users. |
||||
|
* **Contact**; Put a form to get message from the web site visitors. |
||||
|
|
||||
|
There are more planned components like articles, tags, votes, favorites, portfolio, image gallery, FAQ... etc. We will document and deploy these components when they get matured and ready to use. Some of them will be open source & free while some of them are paid (included in the [ABP Commercial](https://commercial.abp.io/) license). |
||||
|
|
||||
|
## Feedback |
||||
|
|
||||
|
Please try the ABP Framework 3.2.0 RC and [provide feedback](https://github.com/abpframework/abp/issues/new) to help us to release a more stable version. The planned release date for the [3.2.0 final](https://github.com/abpframework/abp/milestone/43) version is October 01. |
||||
|
After Width: | Height: | Size: 551 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 216 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 55 KiB |
@ -0,0 +1,47 @@ |
|||||
|
# ABP Framework 3.2 Final Has Been Released |
||||
|
|
||||
|
ABP Framework & ABP Commercial 3.2 have been released today. |
||||
|
|
||||
|
Since all the new features are already explained in details with the [3.2 RC Announcement Post](https://blog.abp.io/abp/ABP-Framework-ABP-Commercial-3.2-RC-With-The-New-Blazor-UI), I will not repeat all the details again. Please read [the RC post](https://blog.abp.io/abp/ABP-Framework-ABP-Commercial-3.2-RC-With-The-New-Blazor-UI) for **new feature and changes** you may need to do for your solution while upgrading to the version 3.2. |
||||
|
|
||||
|
## Creating New Solutions |
||||
|
|
||||
|
You can create a new solution with the ABP Framework version 3.2 by either using the `abp new` command or using the **direct download** tab on the [get started page](https://abp.io/get-started). |
||||
|
|
||||
|
> See the [getting started document](https://docs.abp.io/en/abp/latest/Getting-Started) for details. |
||||
|
|
||||
|
## How to Upgrade an Existing Solution |
||||
|
|
||||
|
### Install/Update the ABP CLI |
||||
|
|
||||
|
First of all, install the ABP CLI or upgrade to the latest version. |
||||
|
|
||||
|
If you haven't installed yet: |
||||
|
|
||||
|
````bash |
||||
|
dotnet tool install -g Volo.Abp.Cli |
||||
|
```` |
||||
|
|
||||
|
To update an existing installation: |
||||
|
|
||||
|
```bash |
||||
|
dotnet tool update -g Volo.Abp.Cli |
||||
|
``` |
||||
|
|
||||
|
### ABP UPDATE Command |
||||
|
|
||||
|
[ABP CLI](https://docs.abp.io/en/abp/latest/CLI) provides a handy command to update all the ABP related NuGet and NPM packages in your solution with a single command: |
||||
|
|
||||
|
````bash |
||||
|
abp update |
||||
|
```` |
||||
|
|
||||
|
After the update command, check [the RC blog post](https://blog.abp.io/abp/ABP-Framework-ABP-Commercial-3.2-RC-With-The-New-Blazor-UI) to learn if you need to make any changes in your solution. |
||||
|
|
||||
|
> You may want to see the new [upgrading document](https://docs.abp.io/en/abp/latest/Upgrading). |
||||
|
|
||||
|
## About the Next Versions |
||||
|
|
||||
|
The next two versions (3.3 & 4.0) will be mostly related to completing the Blazor UI features and upgrading the ABP Framework & ecosystem to the .NET 5.0. |
||||
|
|
||||
|
The ultimate goal is to complete the version 4.0 with a stable Blazor UI with the fundamental features implemented and publish it just after the Microsoft lunches .NET 5 in this November. |
||||
@ -0,0 +1,271 @@ |
|||||
|
# ABP Framework 3.3 RC Has Been Published |
||||
|
|
||||
|
We have released the [ABP Framework](https://abp.io/) (and the [ABP Commercial](https://commercial.abp.io/)) `3.3.0-rc.1` today. This blog post introduces the new features and important changes in the new version. |
||||
|
|
||||
|
## Get Started with the 3.3 RC.1 |
||||
|
|
||||
|
If you want to try the version `3.3.0-rc.1` today, follow the steps below; |
||||
|
|
||||
|
1) **Upgrade** the ABP CLI to the version `3.3.0-rc.1` using a command line terminal: |
||||
|
|
||||
|
````bash |
||||
|
dotnet tool update Volo.Abp.Cli -g --version 3.3.0-rc.1 |
||||
|
```` |
||||
|
|
||||
|
**or install** if you haven't installed before: |
||||
|
|
||||
|
````bash |
||||
|
dotnet tool install Volo.Abp.Cli -g --version 3.3.0-rc.1 |
||||
|
```` |
||||
|
|
||||
|
2) Create a **new application** with the `--preview` option: |
||||
|
|
||||
|
````bash |
||||
|
abp new BookStore --preview |
||||
|
```` |
||||
|
|
||||
|
See the [ABP CLI documentation](https://docs.abp.io/en/abp/3.3/CLI) for all the available options. |
||||
|
|
||||
|
> You can also use the *Direct Download* tab on the [Get Started](https://abp.io/get-started) page by selecting the Preview checkbox. |
||||
|
|
||||
|
## What's new with the ABP Framework 3.3 |
||||
|
|
||||
|
### The Blazor UI |
||||
|
|
||||
|
We had released an experimental early preview version of the Blazor UI with the [previous version](https://blog.abp.io/abp/ABP-Framework-ABP-Commercial-3.2-RC-With-The-New-Blazor-UI). In this version, we've completed most of the fundamental infrastructure features and the application modules (like identity and tenant management). |
||||
|
|
||||
|
It currently has almost the same functionalities as the other UI types (Angular & MVC / Razor Pages). |
||||
|
|
||||
|
**Example screenshot**: User management page of the Blazor UI |
||||
|
|
||||
|
 |
||||
|
|
||||
|
> We've adapted the [Lepton Theme](https://commercial.abp.io/themes) for the ABP Commercial, see the related section below. |
||||
|
|
||||
|
We are still working on the fundamentals. So, the next version may introduce breaking changes of the Blazor UI. We will work hard to keep them with the minimal effect on your application code. |
||||
|
|
||||
|
#### Breaking Changes on the Blazor UI |
||||
|
|
||||
|
There are some breaking changes with the Blazor UI. If you've built an application and upgrade it, your application might not properly work. See [the migration guide](https://docs.abp.io/en/abp/3.3/Migration-Guides/BlazorUI-3_3) for the changes you need to do after upgrading your application. |
||||
|
|
||||
|
### Automatic Validation for AntiForgery Token for HTTP APIs |
||||
|
|
||||
|
Starting with the version 3.3, all your HTTP API endpoints are **automatically protected** against CSRF attacks, unless you disable it for your application. So, no configuration needed, just upgrade the ABP Framework. |
||||
|
|
||||
|
[See the documentation](https://docs.abp.io/en/abp/3.3/CSRF-Anti-Forgery) to if you want to understand why you need it and how ABP Framework solves the problem. |
||||
|
|
||||
|
### Rebus Integration Package for the Distributed Event Bus |
||||
|
|
||||
|
[Rebus](https://github.com/rebus-org/Rebus) describes itself as "Simple and lean service bus implementation for .NET". There are a lot of integration packages like RabbitMQ and Azure Service Bus for the Rebus. The new [Volo.Abp.EventBus.Rebus](https://www.nuget.org/packages/Volo.Abp.EventBus.Rebus) package allows you to use the Rebus as the [distributed event bus](https://docs.abp.io/en/abp/latest/Distributed-Event-Bus) for the ABP Framework. |
||||
|
|
||||
|
See [the documentation](https://docs.abp.io/en/abp/3.3/Distributed-Event-Bus-Rebus-Integration) to learn how to use Rebus with the ABP Framework. |
||||
|
|
||||
|
### Async Repository LINQ Extension Methods |
||||
|
|
||||
|
You have a problem when you want to use **Async LINQ Extension Methods** (e.g. `FirstOrDefaultAsync(...)`) in your **domain** and **application** layers. These async methods are **not included in the standard LINQ extension methods**. Those are defined by the [Microsoft.EntityFrameworkCore](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore) NuGet package (see [the code](https://github.com/dotnet/efcore/blob/main/src/EFCore/Extensions/EntityFrameworkQueryableExtensions.cs)). To be able to use these `async` methods, you need to reference to the `Microsoft.EntityFrameworkCore` package. |
||||
|
|
||||
|
If you don't want to depend on the EF Core in your business layer, then ABP Framework provides the `IAsyncQueryableExecuter` service to execute your queries asynchronously without depending on the EF Core package. You can see [the documentation](https://docs.abp.io/en/abp/latest/Repositories#option-3-iasyncqueryableexecuter) to get more information about this service. |
||||
|
|
||||
|
ABP Framework version 3.3 takes this one step further and allows you to directly execute the async LINQ extension methods on the `IRepository` interface. |
||||
|
|
||||
|
**Example: Use `CountAsync` and `FirstOrDefaultAsync` methods on the repositories** |
||||
|
|
||||
|
````csharp |
||||
|
using System; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.Application.Services; |
||||
|
using Volo.Abp.Domain.Repositories; |
||||
|
|
||||
|
namespace MyCompanyName.MyProjectName |
||||
|
{ |
||||
|
public class BookAppService : ApplicationService, IBookAppService |
||||
|
{ |
||||
|
private readonly IRepository<Book, Guid> _bookRepository; |
||||
|
|
||||
|
public BookAppService(IRepository<Book, Guid> bookRepository) |
||||
|
{ |
||||
|
_bookRepository = bookRepository; |
||||
|
} |
||||
|
|
||||
|
public async Task DemoAsync() |
||||
|
{ |
||||
|
var countAll = await _bookRepository |
||||
|
.CountAsync(); |
||||
|
|
||||
|
var count = await _bookRepository |
||||
|
.CountAsync(x => x.Name.Contains("A")); |
||||
|
|
||||
|
var book1984 = await _bookRepository |
||||
|
.FirstOrDefaultAsync(x => x.Name == "1984"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
```` |
||||
|
|
||||
|
All the standard LINQ methods are supported: *AllAsync, AnyAsync, AverageAsync, ContainsAsync, CountAsync, FirstAsync, FirstOrDefaultAsync, LastAsync, LastOrDefaultAsync, LongCountAsync, MaxAsync, MinAsync, SingleAsync, SingleOrDefaultAsync, SumAsync, ToArrayAsync, ToListAsync*. |
||||
|
|
||||
|
This approach still has a limitation. You need to execute the extension method directly on the repository object. For example, the below usage is **not supported**: |
||||
|
|
||||
|
````csharp |
||||
|
var count = await _bookRepository.Where(x => x.Name.Contains("A")).CountAsync(); |
||||
|
```` |
||||
|
|
||||
|
This is because the object returned from the `Where` method is not a repository object, it is a standard `IQueryable`. In such cases, you can still use the `IAsyncQueryableExecuter`: |
||||
|
|
||||
|
````csharp |
||||
|
var count = await AsyncExecuter.CountAsync( |
||||
|
_bookRepository.Where(x => x.Name.Contains("A")) |
||||
|
); |
||||
|
```` |
||||
|
|
||||
|
`AsyncExecuter` has all the standard extension methods, so you don't have any restriction here. See [the repository documentation](https://docs.abp.io/en/abp/latest/Repositories#iqueryable-async-operations) for all the options you have. |
||||
|
|
||||
|
> ABP Framework does its best to not depend on the EF Core and still be able to use the async LINQ extension methods. However, there is no problem to depend on the EF Core for your application, you can add the `Microsoft.EntityFrameworkCore` NuGet package and use the native methods. |
||||
|
|
||||
|
### Stream Support for the Application Service Methods |
||||
|
|
||||
|
[Application services](https://docs.abp.io/en/abp/latest/Application-Services) are consumed by clients and the parameters and return values (typically [Data Transfer Objects](https://docs.abp.io/en/abp/latest/Data-Transfer-Objects)). In case of the client is a remote application, then these objects should be serialized & deserialized. |
||||
|
|
||||
|
Until the version 3.3, we hadn't suggest to use the `Stream` in the application service contracts, since it is not serializable/deserializable. However, with the version 3.3, ABP Framework properly supports this scenario by introducing the new `IRemoteStreamContent` interface. |
||||
|
|
||||
|
Example: An application service that can get or return streams |
||||
|
|
||||
|
````csharp |
||||
|
using System; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.Application.Services; |
||||
|
using Volo.Abp.Content; |
||||
|
|
||||
|
namespace MyProject.Test |
||||
|
{ |
||||
|
public interface ITestAppService : IApplicationService |
||||
|
{ |
||||
|
Task Upload(Guid id, IRemoteStreamContent streamContent); |
||||
|
Task<IRemoteStreamContent> Download(Guid id); |
||||
|
} |
||||
|
} |
||||
|
```` |
||||
|
|
||||
|
The implementation can be as shown below: |
||||
|
|
||||
|
````csharp |
||||
|
using System; |
||||
|
using System.IO; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp; |
||||
|
using Volo.Abp.Application.Services; |
||||
|
using Volo.Abp.Content; |
||||
|
|
||||
|
namespace MyProject.Test |
||||
|
{ |
||||
|
public class TestAppService : ApplicationService, ITestAppService |
||||
|
{ |
||||
|
public Task<IRemoteStreamContent> Download(Guid id) |
||||
|
{ |
||||
|
var fs = new FileStream("C:\\Temp\\" + id + ".blob", FileMode.OpenOrCreate); |
||||
|
return Task.FromResult( |
||||
|
(IRemoteStreamContent) new RemoteStreamContent(fs) { |
||||
|
ContentType = "application/octet-stream" |
||||
|
} |
||||
|
); |
||||
|
} |
||||
|
|
||||
|
public async Task Upload(Guid id, IRemoteStreamContent streamContent) |
||||
|
{ |
||||
|
using (var fs = new FileStream("C:\\Temp\\" + id + ".blob", FileMode.Create)) |
||||
|
{ |
||||
|
await streamContent.GetStream().CopyToAsync(fs); |
||||
|
await fs.FlushAsync(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
```` |
||||
|
|
||||
|
> This is just a demo code. Do it better in your production code :) |
||||
|
|
||||
|
Thanks to [@alexandru-bagu](https://github.com/alexandru-bagu) for the great contribution! |
||||
|
|
||||
|
### Other Changes |
||||
|
|
||||
|
* Upgraded all the .NET Core / ASP.NET Core related packages to the version 3.1.8. If you have additional dependencies to the .NET Core / ASP.NET Core related packages, we suggest you to updates your packages to the version 3.1.8 to have the latest bug and security fixes published by Microsoft. |
||||
|
* The blogging module now uses the [BLOB Storing](https://docs.abp.io/en/abp/latest/Blob-Storing) system to store images & files of the blog posts. If you are using this module, then you need to manually migrate the local files to the BLOB Storing system after the upgrade. |
||||
|
* The Angular UI is now redirecting to the profile management page of the MVC UI instead of using its own UI, if you've configured the authorization code flow (which is default since the version 3.2.0). |
||||
|
|
||||
|
## What's new with the ABP Commercial 3.3 |
||||
|
|
||||
|
### The Blazor UI |
||||
|
|
||||
|
We have good news for the ABP Commercial Blazor UI too. We have implemented the [Lepton Theme](https://commercial.abp.io/themes) integration, so it is now available with the Blazor UI. Also, implemented most of the fundamental [modules](https://commercial.abp.io/modules). |
||||
|
|
||||
|
**A screenshot from the ABP Commercial startup template with the Blazor UI** |
||||
|
|
||||
|
 |
||||
|
|
||||
|
There are still missing features and modules. However, we are working on it to have a more complete version in the next release. |
||||
|
|
||||
|
#### Breaking Changes on the Blazor UI |
||||
|
|
||||
|
There are some breaking changes with the Blazor UI. If you've built an application and upgrade it, your application might not properly work. See the [ABP Commercial Blazor UI v 3.3 Migration Guide](https://docs.abp.io/en/commercial/3.3/migration-guides/blazor-ui-3_3) for the changes you need to do after upgrading your application. |
||||
|
|
||||
|
#### Known Issues |
||||
|
|
||||
|
When you create a new project, profile management doesn't work, you get an exception because it can't find the `/libs/cropperjs/css/cropper.min.css` file. To fix the issue; |
||||
|
|
||||
|
* Add `"@volo/account": "^3.3.0-rc.1"` to the `package.json` in the `.Host` project. |
||||
|
* Run `yarn` (or `npm install`), then `gulp` on a command line terminal in the root folder of the `.Host` project. |
||||
|
|
||||
|
### Multi-Tenant Social Logins |
||||
|
|
||||
|
[Account module](https://commercial.abp.io/modules/Volo.Account.Pro) now supports to manage the social/external logins in the UI. You can **enable/disable** and **set options** in the settings page. It also supports to use **different credentials for the tenants** and it is also **configured on the runtime**. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
### Linked Accounts |
||||
|
|
||||
|
Linked user system allows you to link other accounts (including account in a different tenant) with your account, so you can switch between different accounts with a single-click. It is practical since you no longer need to logout and login again with entering the credentials of the target account. |
||||
|
|
||||
|
To manage the linked accounts, go to the profile management page from the user menu; |
||||
|
|
||||
|
 |
||||
|
|
||||
|
### Paypal & Stripe Integrations |
||||
|
|
||||
|
The [Payment Module](https://commercial.abp.io/modules/Volo.Payment) was supporting PayU and 2Checkout providers until the version 3.3. It's now integrated to PayPal and Stripe. See the [technical documentation](https://docs.abp.io/en/commercial/latest/modules/payment) to learn how to use it. |
||||
|
|
||||
|
### ABP Suite Improvements |
||||
|
|
||||
|
We've done a lot of small improvements for the [ABP Suite](https://commercial.abp.io/tools/suite). Some of the enhancements are; |
||||
|
|
||||
|
* Show the previously installed modules as *installed* on the module list. |
||||
|
* Switch between the latest stable, the latest [preview](https://docs.abp.io/en/abp/latest/Previews) and the latest [nightly build](https://docs.abp.io/en/abp/latest/Nightly-Builds) versions of the ABP related packages. |
||||
|
* Moved the file that stores the *previously created entities* into the solution folder to allow you to store it in your source control system. |
||||
|
|
||||
|
### Others |
||||
|
|
||||
|
* Added an option to the Account Module to show reCAPTCHA on the login & the registration forms. |
||||
|
|
||||
|
Besides the new features introduced in this post, we've done a lot of small other enhancements and bug fixes to provide a better development experience and increase the developer productivity. |
||||
|
|
||||
|
## New Articles |
||||
|
|
||||
|
The core ABP Framework team & the community continue to publish new articles on the [ABP Community](https://community.abp.io/) web site. The recently published articles are; |
||||
|
|
||||
|
* [Replacing Email Templates and Sending Emails](https://community.abp.io/articles/replacing-email-templates-and-sending-emails-jkeb8zzh) (by [@EngincanV](https://community.abp.io/members/EngincanV)) |
||||
|
* [How to Add Custom Properties to the User Entity](https://community.abp.io/articles/how-to-add-custom-property-to-the-user-entity-6ggxiddr) (by [@berkansasmaz](https://community.abp.io/members/berkansasmaz)) |
||||
|
* [Using the AdminLTE Theme with the ABP Framework MVC / Razor Pages UI](https://community.abp.io/articles/using-the-adminlte-theme-with-the-abp-framework-mvc-razor-pages-ui-gssbhb7m) (by [@mucahiddanis](https://community.abp.io/members/mucahiddanis)) |
||||
|
* [Using DevExtreme Angular Components With the ABP Framework](https://community.abp.io/articles/using-devextreme-angular-components-with-the-abp-framework-x5nyvj3i) (by [@bunyamin](https://community.abp.io/members/bunyamin)) |
||||
|
|
||||
|
It is appreciated if you want to [submit an article](https://community.abp.io/articles/submit) related to the ABP Framework. |
||||
|
|
||||
|
## About the Next Release |
||||
|
|
||||
|
The next version will be `4.0.0`. We are releasing a major version, since we will move the ABP Framework to .NET 5.0. We see that for most of the applications this will not be a breaking change and we hope you easily upgrade to it. |
||||
|
|
||||
|
The planned 4.0.0-rc.1 (Release Candidate) version date is **November 11**, just after the Microsoft releases the .NET 5.0 final. The planned 4.0.0 final release date is **November 26**. |
||||
|
|
||||
|
Follow the [GitHub milestones](https://github.com/abpframework/abp/milestones) for all the planned ABP Framework version release dates. |
||||
|
|
||||
|
## Feedback |
||||
|
|
||||
|
Please check out the ABP Framework 3.3.0 RC and [provide feedback](https://github.com/abpframework/abp/issues/new) to help us to release a more stable version. The planned release date for the [3.3.0 final](https://github.com/abpframework/abp/milestone/44) version is October 27th. |
||||
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 181 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 199 KiB |
@ -0,0 +1,47 @@ |
|||||
|
# ABP Framework & ABP Commercial 3.3 Final Have Been Released |
||||
|
|
||||
|
ABP Framework & ABP Commercial 3.3.0 have been released today. |
||||
|
|
||||
|
Since all the new features are already explained in details with the [3.3 RC Announcement Post](https://blog.abp.io/abp/ABP-Framework-ABP-Commercial-v3.3-RC-Have-Been-Released), I will not repeat all the details again. Please read [the RC post](https://blog.abp.io/abp/ABP-Framework-ABP-Commercial-v3.3-RC-Have-Been-Released) for **new feature and changes** you may need to do for your solution while upgrading to the version 3.3. |
||||
|
|
||||
|
## Creating New Solutions |
||||
|
|
||||
|
You can create a new solution with the ABP Framework version 3.3 by either using the `abp new` command or using the **direct download** tab on the [get started page](https://abp.io/get-started). |
||||
|
|
||||
|
> See the [getting started document](https://docs.abp.io/en/abp/latest/Getting-Started) for details. |
||||
|
|
||||
|
## How to Upgrade an Existing Solution |
||||
|
|
||||
|
### Install/Update the ABP CLI |
||||
|
|
||||
|
First of all, install the ABP CLI or upgrade to the latest version. |
||||
|
|
||||
|
If you haven't installed yet: |
||||
|
|
||||
|
````bash |
||||
|
dotnet tool install -g Volo.Abp.Cli |
||||
|
```` |
||||
|
|
||||
|
To update an existing installation: |
||||
|
|
||||
|
```bash |
||||
|
dotnet tool update -g Volo.Abp.Cli |
||||
|
``` |
||||
|
|
||||
|
### ABP UPDATE Command |
||||
|
|
||||
|
[ABP CLI](https://docs.abp.io/en/abp/latest/CLI) provides a handy command to update all the ABP related NuGet and NPM packages in your solution with a single command: |
||||
|
|
||||
|
````bash |
||||
|
abp update |
||||
|
```` |
||||
|
|
||||
|
Run this command in the root folder of your solution. After the update command, check [the RC blog post](https://blog.abp.io/abp/ABP-Framework-ABP-Commercial-v3.3-RC-Have-Been-Released) to learn if you need to make any changes in your solution. |
||||
|
|
||||
|
> You may want to see the new [upgrading document](https://docs.abp.io/en/abp/latest/Upgrading). |
||||
|
|
||||
|
## About the Next Version: 4.0 |
||||
|
|
||||
|
The next version will be 4.0 and it will be mostly related to completing the Blazor UI features and upgrading the ABP Framework & ecosystem to the .NET 5.0. |
||||
|
|
||||
|
The goal is to complete the version 4.0 with a stable Blazor UI with the fundamental features implemented and publish it just after the Microsoft lunches .NET 5 in this November. The planned 4.0 preview release date is November 11th. |
||||
@ -0,0 +1,67 @@ |
|||||
|
# Build Command |
||||
|
|
||||
|
Building a .NET project is hard when the project references a project reference outside of the solution or even from a different GIT repository. This command builds a GIT repository and it's depending repositories or a single .NET solution File. In order ```build``` command to work, its **executing directory** or passed ```--working-directory``` parameter's directory must contain one of; |
||||
|
|
||||
|
* A .NET solution file (*.sln) |
||||
|
* abp-build-config.json |
||||
|
|
||||
|
When the executing directory (or ```--working-directory``` parameter's directory) contains a .NET solution file, ```build``` command builds all the projects in the related solution file and all project references on building project files recursively. |
||||
|
|
||||
|
When the executing directory (or ```--working-directory``` parameter's directory) contains a ```abp-build-config.json```, ```build``` command builds all changed projects form its last build and all project references on building project files recursively. |
||||
|
|
||||
|
# Build Command Config |
||||
|
|
||||
|
```abp-build-config.json``` contains properties below; |
||||
|
|
||||
|
* ```Name```: Name of the GIT repository. This can be friendly name of your GIT repository or any other unique string for the repository. |
||||
|
* ```RootPath```: Root path of the repository which contains ```.git``` folder. |
||||
|
* ```DependingRepositories```: Depending repository list of a repository. Each depending repository item contains same fields as a repository. |
||||
|
* ```IgnoredDirectories```: Relative directory paths to ignore while building a GIT repository. |
||||
|
|
||||
|
A sample ```abp-build-config.json``` looks like for a Windows OS; |
||||
|
|
||||
|
````json |
||||
|
{ |
||||
|
"Name": "main-repository", |
||||
|
"RootPath": "D:\\GitHub\\main-repository", |
||||
|
"DependingRepositories": [{ |
||||
|
"Name": "module-repository", |
||||
|
"RootPath": "D:\\GitHub\\module-repository" |
||||
|
}], |
||||
|
"IgnoredDirectories": [ |
||||
|
"utils" |
||||
|
] |
||||
|
} |
||||
|
```` |
||||
|
|
||||
|
# Build Status |
||||
|
|
||||
|
ABP CLI stores a build status file for builds using the repository friendly names and current branch names in the; |
||||
|
|
||||
|
* ```%USERPROFILE%\.abp\build\``` for Windows. |
||||
|
* ```$HOME/.abp/build/``` for Linux/macOS. |
||||
|
|
||||
|
and uses this file when building same repository next time and only builds affected projects and decreases the total build time. A sample build status file content looks like; |
||||
|
|
||||
|
````json |
||||
|
{ |
||||
|
"RepositoryName": "main-repository", |
||||
|
"BranchName": "dev", |
||||
|
"CommitId": "84ecde8ba275aeeb14d24a87ad46a1e941adf8ba", |
||||
|
"SucceedProjects": [{ |
||||
|
"CsProjPath": "D:\\GitHub\\main-repository\\BookStore\\BookStore.Web.csproj", |
||||
|
"CommitId": "84ecde8ba275aeeb14d24a87ad46a1e941adf8ba" |
||||
|
}], |
||||
|
"DependingRepositories": [{ |
||||
|
"RepositoryName": "module-repository", |
||||
|
"BranchName": "dev", |
||||
|
"CommitId": "0598b8e45af9507fc9ba8abf304e78fc7d434e04", |
||||
|
"SucceedProjects": [{ |
||||
|
"CsProjPath": "D:\\GitHub\\module-repository\\identity-module\Identity\\Identity.Web.csproj", |
||||
|
"CommitId": "0598b8e45af9507fc9ba8abf304e78fc7d434e04" |
||||
|
}], |
||||
|
"DependingRepositories": [] |
||||
|
}] |
||||
|
} |
||||
|
```` |
||||
|
|
||||
@ -0,0 +1,119 @@ |
|||||
|
# CSRF/XSRF & Anti Forgery System |
||||
|
|
||||
|
"*Cross-Site Request Forgery (CSRF) is a type of attack that occurs when a malicious web site, email, blog, instant message, or program causes a user’s web browser to perform an unwanted action on a trusted site for which the user is currently authenticated*" ([OWASP](https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet)). |
||||
|
|
||||
|
**ABP Framework completely automates CSRF preventing** and works out of the box without any configuration. Read this documentation only if you want to understand it better or need to customize. |
||||
|
|
||||
|
## The Problem |
||||
|
|
||||
|
ASP.NET Core [provides infrastructure](https://docs.microsoft.com/en-us/aspnet/core/security/anti-request-forgery) to prevent CSRF attacks by providing a system to **generate** and **validate antiforgery tokens**. However, the standard implementation has a few drawbacks; |
||||
|
|
||||
|
Antiforgery token validation is only **enabled for razor pages by default** and not enabled for **HTTP APIs**. You need to enable it yourself for the Controllers. You can use the `[ValidateAntiForgeryToken]` attribute for a specific API Controller/Action or the `[AutoValidateAntiforgeryToken]` attribute to prevent attacks globally. |
||||
|
|
||||
|
Once you enable it; |
||||
|
|
||||
|
* You need to manually add an HTTP header, named `RequestVerificationToken` to every **AJAX request** made in your application. You should care about obtaining the token, saving in the client side and adding to the HTTP header on every HTTP request. |
||||
|
* All your clients, including **non-browser clients**, should care about obtaining and sending the antiforgery token in every request. In fact, non-browser clients has no CSRF risk and should not care about this. |
||||
|
|
||||
|
Especially, the second point is a pain for your clients and unnecessarily consumes your server resources. |
||||
|
|
||||
|
> You can read more about the ASP.NET Core antiforgery system in its own [documentation](https://docs.microsoft.com/en-us/aspnet/core/security/anti-request-forgery). |
||||
|
|
||||
|
## The Solution |
||||
|
|
||||
|
ABP Framework provides `[AbpValidateAntiForgeryToken]` and `[AbpAutoValidateAntiforgeryToken]` attributes, just like the attributes explained above. `[AbpAutoValidateAntiforgeryToken]` is already added to the global filters, so you should do nothing to enable it for your application. |
||||
|
|
||||
|
ABP Framework also automates the following infrastructure; |
||||
|
|
||||
|
* Server side sets a **special cookie**, named `XSRF-TOKEN` by default, that is used make the antiforgery token value available to the browser. This is **done automatically** (by the [application configuration](Application-Configuration.md) endpoint). Nothing to do in the client side. |
||||
|
* In the client side, it reads the token from the cookie and sends it in the **HTTP header** (named `RequestVerificationToken` by default). This is implemented for all the supported UI types. |
||||
|
* Server side validates the antiforgery token **only for same and cross site requests** made by the browser. It bypasses the validation for non-browser clients. |
||||
|
|
||||
|
That's all. The systems works smoothly. |
||||
|
|
||||
|
## Configuration / Customization |
||||
|
|
||||
|
### AbpAntiForgeryOptions |
||||
|
|
||||
|
`AbpAntiForgeryOptions` is the main [options class](Options.md) to configure the ABP Antiforgery system. It has the following properties; |
||||
|
|
||||
|
* `TokenCookie`: Can be used to configure the cookie details. This cookie is used to store the antiforgery token value in the client side, so clients can read it and sends the value as the HTTP header. Default cookie name is `XSRF-TOKEN`, expiration time is 10 years (yes, ten years! It should be a value longer than the authentication cookie max life time, for the security). |
||||
|
* `AuthCookieSchemaName`: The name of the authentication cookie used by your application. Default value is `Identity.Application` (which becomes `AspNetCore.Identity.Application` on runtime). The default value properly works with the ABP startup templates. **If you change the authentication cookie name, you also must change this.** |
||||
|
* `AutoValidate`: The single point to enable/disable the ABP automatic antiforgery validation system. Default value is `true`. |
||||
|
* `AutoValidateFilter`: A predicate that gets a type and returns a boolean. ABP uses this predicate to check a controller type. If it returns false for a controller type, the controller is excluded from the automatic antiforgery token validation. |
||||
|
* `AutoValidateIgnoredHttpMethods`: A list of HTTP Methods to ignore on automatic antiforgery validation. Default value: "GET", "HEAD", "TRACE", "OPTIONS". These HTTP Methods are safe to skip antiforgery validation since they don't change the application state. |
||||
|
|
||||
|
If you need to change these options, do it in the `ConfigureServices` method of your [module](Module-Development-Basics.md). |
||||
|
|
||||
|
**Example: Configuring the AbpAntiForgeryOptions** |
||||
|
|
||||
|
```csharp |
||||
|
Configure<AbpAntiForgeryOptions>(options => |
||||
|
{ |
||||
|
options.TokenCookie.Expiration = TimeSpan.FromDays(365); |
||||
|
options.AutoValidateIgnoredHttpMethods.Remove("GET"); |
||||
|
options.AutoValidateFilter = |
||||
|
type => !type.Namespace.StartsWith("MyProject.MyIgnoredNamespace"); |
||||
|
}); |
||||
|
``` |
||||
|
|
||||
|
This configuration; |
||||
|
|
||||
|
* Sets the antiforgery token expiration time to ~1 year. |
||||
|
* Enables antiforgery token validation for GET requests too. |
||||
|
* Ignores the controller types in the specified namespace. |
||||
|
|
||||
|
### AntiforgeryOptions |
||||
|
|
||||
|
`AntiforgeryOptions` is the standard [options class](Options.md) of the ASP.NET Core. **You can find all the information about this class in its [own documentation](https://docs.microsoft.com/en-us/aspnet/core/security/anti-request-forgery)**. |
||||
|
|
||||
|
`HeaderName` option is especially important for the ABP Framework point of view. Default value of this value is `RequestVerificationToken` and the clients uses this name while sending the token value in the header. So, if you change this option, you should also arrange your clients to align the change. If you don't have a good reason, leave it as default. |
||||
|
|
||||
|
### AbpValidateAntiForgeryToken Attribute |
||||
|
|
||||
|
If you disable the automatic validation or want to perform the validation for an endpoint that is not validated by default (for example, an endpoint with HTTP GET Method), you can use the `[AbpValidateAntiForgeryToken]` attribute for a **controller type or method** (action). |
||||
|
|
||||
|
**Example: Add `[AbpValidateAntiForgeryToken]` to a HTTP GET method** |
||||
|
|
||||
|
```csharp |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Volo.Abp.AspNetCore.Mvc; |
||||
|
using Volo.Abp.AspNetCore.Mvc.AntiForgery; |
||||
|
|
||||
|
namespace MyCompanyName.MyProjectName.Controllers |
||||
|
{ |
||||
|
[Route("api/products")] |
||||
|
public class ProductController : AbpController |
||||
|
{ |
||||
|
[HttpGet] |
||||
|
[AbpValidateAntiForgeryToken] |
||||
|
public async Task GetAsync() |
||||
|
{ |
||||
|
//TODO: ... |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
``` |
||||
|
|
||||
|
### Angular UI |
||||
|
|
||||
|
Angular supports CSRF Token out of box, but the token header name is `X-XSRF-TOKEN`. Since ABP Framework follows the ASP.NET Core conventions, it changes this value to `RequestVerificationToken` in the core package. |
||||
|
|
||||
|
You don't need to make anything unless you need to change the `AntiforgeryOptions.HeaderName` as explained before. If you change it, remember to change the header name for the Angular application too. To do that, add an import declaration for the `HttpClientXsrfModule` into your root module. |
||||
|
|
||||
|
**Example: Change the header name to *MyCustomHeaderName*** |
||||
|
|
||||
|
```typescript |
||||
|
@NgModule({ |
||||
|
// ... |
||||
|
imports: [ |
||||
|
//... |
||||
|
HttpClientXsrfModule.withOptions({ |
||||
|
cookieName: 'XSRF-TOKEN', |
||||
|
headerName: 'MyCustomHeaderName' |
||||
|
}) |
||||
|
], |
||||
|
}) |
||||
|
export class AppModule {} |
||||
|
``` |
||||
@ -0,0 +1,477 @@ |
|||||
|
# Replacing Email Templates and Sending Emails |
||||
|
|
||||
|
## Introduction |
||||
|
|
||||
|
Hi, in this step by step article, we will send an email by using standard email template and then we will replace the standard email template with our new created template, thanks to [Text Templating System](https://docs.abp.io/en/abp/latest/Text-Templating#replacing-the-existing-templates) and [Virtual File System](https://docs.abp.io/en/abp/latest/Virtual-File-System). Let's start by explaining what these systems do. |
||||
|
|
||||
|
* ABP framework provides a strong and flexible [Text Templating System](https://docs.abp.io/en/abp/latest/Text-Templating). So, we can use the text templating system to create dynamic email contents on a template and a model. |
||||
|
|
||||
|
* In this article, we will use `StandardEmailTemplates.Message` as standard email template. Then we will create a new template and replace the standard email template with our new template by using [Virtual File System](https://docs.abp.io/en/abp/latest/Virtual-File-System). |
||||
|
|
||||
|
* The `Virtual File System` makes it possible to manage files that do not physically exist on the file system. That means we can override `StandardEmailTemplates.Message` template by changing it's path with our new template's path. |
||||
|
|
||||
|
## Creating the Solution |
||||
|
|
||||
|
> ABP Framework offers startup templates to get into the business faster. |
||||
|
|
||||
|
In this article, I will create a new startup template and perform the operations on this template. But if you already have a project you don't need to create a new startup template, you can implement the following steps to your existing project. (These steps can be applied to any project. (MVC, Angular etc.)) |
||||
|
|
||||
|
> If you have already a project you can skip this section. |
||||
|
|
||||
|
Before starting to development, we will create a solution named `TemplateReplace` (or whatever you want). We can create a new startup template by using [ABP CLI](https://docs.abp.io/en/abp/latest/CLI) : |
||||
|
|
||||
|
````bash |
||||
|
abp new TemplateReplace |
||||
|
```` |
||||
|
|
||||
|
Our project boilerplate will be ready after the download is finished. Then, open the solution in the Visual Studio (or your favorite IDE). |
||||
|
|
||||
|
Run the `TemplateReplace.DbMigrator` application as below to create the database and seed initial data (which creates the admin user, admin role, permissions etc.). |
||||
|
|
||||
|
 |
||||
|
|
||||
|
* Right click to `TemplateReplace.DbMigrator` and choose the `Debug`. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
* After that, click the `Start new instance` option to start the database migrations. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
Then we can run the `TemplateReplace.Web` project to see our application working. |
||||
|
|
||||
|
> _Default login credentials for admin: username is **admin** and password is **1q2w3E\***_ |
||||
|
|
||||
|
## Starting the Development |
||||
|
|
||||
|
First thing we need to do is, creating a email service to sending emails. ABP Framework provides `IEmailSender` service that is used to send emails. |
||||
|
|
||||
|
### Step - 1 |
||||
|
|
||||
|
Create an `Emailing` folder in the `TemplateReplace.Domain` project and add a class named `EmailService` inside of it. |
||||
|
|
||||
|
```csharp |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Volo.Abp.Emailing; |
||||
|
using Volo.Abp.Emailing.Templates; |
||||
|
using Volo.Abp.TextTemplating; |
||||
|
|
||||
|
namespace TemplateReplace.Emailing |
||||
|
{ |
||||
|
public class EmailService : ITransientDependency |
||||
|
{ |
||||
|
private readonly IEmailSender _emailSender; |
||||
|
private readonly ITemplateRenderer _templateRenderer; |
||||
|
|
||||
|
public EmailService(IEmailSender emailSender, ITemplateRenderer templateRenderer) |
||||
|
{ |
||||
|
_emailSender = emailSender; |
||||
|
_templateRenderer = templateRenderer; |
||||
|
} |
||||
|
|
||||
|
public async Task SendAsync(string targetEmail) |
||||
|
{ |
||||
|
var emailBody = await _templateRenderer.RenderAsync( |
||||
|
StandardEmailTemplates.Message, |
||||
|
new |
||||
|
{ |
||||
|
message = "ABP Framework provides IEmailSender service that is used to send emails." |
||||
|
} |
||||
|
); |
||||
|
|
||||
|
await _emailSender.SendAsync( |
||||
|
targetEmail, |
||||
|
"Subject", |
||||
|
emailBody |
||||
|
); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
``` |
||||
|
|
||||
|
* To create an email content, we need to inject `ITemplateRenderer` and use the `RenderAsync` method to render a template. |
||||
|
|
||||
|
* We've used `StandardEmailTemplates.Message` as standart email template. This provides us a standard and simple message template to send mails. |
||||
|
|
||||
|
* The resulting email body should be like shown below: |
||||
|
|
||||
|
```html |
||||
|
<!DOCTYPE html> |
||||
|
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> |
||||
|
<head> |
||||
|
<meta charset="utf-8" /> |
||||
|
</head> |
||||
|
<body> |
||||
|
ABP Framework provides IEmailSender service that is used to send emails. |
||||
|
</body> |
||||
|
</html> |
||||
|
``` |
||||
|
|
||||
|
### Step - 2 (Configuring Email Settings) |
||||
|
|
||||
|
* Now, we need to configure some email settings by following [settings documentation](https://docs.abp.io/en/abp/latest/Settings#setting-values-in-the-application-configuration). For achieve this, open the `appsettings.json` file under `TemplateReplace.Web` and configure your email settings in **settings** section like below. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
* Here, I used Google's SMTP settings to send emails via Gmail. You can change these setting values by your need. |
||||
|
|
||||
|
> **Note:** If you want to use Google's SMTP server settings and send emails via Gmail, you should confirm [this](https://myaccount.google.com/u/0/lesssecureapps). |
||||
|
|
||||
|
### Step - 3 |
||||
|
|
||||
|
* After that we need to open `TemplateReplaceDomainModule.cs` file and change its contents as below to sending real-time emails. |
||||
|
|
||||
|
```csharp |
||||
|
using Microsoft.Extensions.DependencyInjection; |
||||
|
using Microsoft.Extensions.DependencyInjection.Extensions; |
||||
|
using TemplateReplace.MultiTenancy; |
||||
|
using Volo.Abp.AuditLogging; |
||||
|
using Volo.Abp.BackgroundJobs; |
||||
|
using Volo.Abp.Emailing; |
||||
|
using Volo.Abp.FeatureManagement; |
||||
|
using Volo.Abp.Identity; |
||||
|
using Volo.Abp.IdentityServer; |
||||
|
using Volo.Abp.Modularity; |
||||
|
using Volo.Abp.MultiTenancy; |
||||
|
using Volo.Abp.PermissionManagement.Identity; |
||||
|
using Volo.Abp.PermissionManagement.IdentityServer; |
||||
|
using Volo.Abp.SettingManagement; |
||||
|
using Volo.Abp.TenantManagement; |
||||
|
|
||||
|
namespace TemplateReplace |
||||
|
{ |
||||
|
[DependsOn( |
||||
|
typeof(TemplateReplaceDomainSharedModule), |
||||
|
typeof(AbpAuditLoggingDomainModule), |
||||
|
typeof(AbpBackgroundJobsDomainModule), |
||||
|
typeof(AbpFeatureManagementDomainModule), |
||||
|
typeof(AbpIdentityDomainModule), |
||||
|
typeof(AbpPermissionManagementDomainIdentityModule), |
||||
|
typeof(AbpIdentityServerDomainModule), |
||||
|
typeof(AbpPermissionManagementDomainIdentityServerModule), |
||||
|
typeof(AbpSettingManagementDomainModule), |
||||
|
typeof(AbpTenantManagementDomainModule), |
||||
|
typeof(AbpEmailingModule) |
||||
|
)] |
||||
|
public class TemplateReplaceDomainModule : AbpModule |
||||
|
{ |
||||
|
public override void OnApplicationInitialization(ApplicationInitializationContext context) |
||||
|
{ |
||||
|
var settingManager = context.ServiceProvider.GetService<SettingManager>(); |
||||
|
//encrypts the password on set and decrypts on get |
||||
|
settingManager.SetGlobalAsync(EmailSettingNames.Smtp.Password, "your_password"); |
||||
|
} |
||||
|
|
||||
|
public override void ConfigureServices(ServiceConfigurationContext context) |
||||
|
{ |
||||
|
Configure<AbpMultiTenancyOptions>(options => |
||||
|
{ |
||||
|
options.IsEnabled = MultiTenancyConsts.IsEnabled; |
||||
|
}); |
||||
|
|
||||
|
// #if DEBUG |
||||
|
// context.Services.Replace(ServiceDescriptor.Singleton<IEmailSender, NullEmailSender>()); |
||||
|
// #endif |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
``` |
||||
|
|
||||
|
* `NullEmailSender` is a built-in class that implements the `IEmailSender`, but writes email contents to the standard log system, rather than actually sending the emails. This class can be useful especially in development time where you generally don't want to send real emails. Therefore ABP framework defined this by default. But in our case we want to send real emails, so we must remove these lines or we must take it to the comment line. |
||||
|
|
||||
|
* `Abp.Mailing.Smtp.Password` must be an encrypted value. Therefore we used `SettingManager` in here to set the password. It internally **encrypts** the values on set and **decrypts** on get. |
||||
|
|
||||
|
* After all these steps, whenever we want to send an email, we can do it by using our `EmailService` class. We can inject this class and invoke the `SendAsync` method to sending email where its needed. |
||||
|
|
||||
|
After sending the email we should see the template like below. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
### Step - 4 (Defining New Template) |
||||
|
|
||||
|
* So far we've sent mail by using standard email template of ABP. But we may want to replace the email template with the new one. We can achieve this by following the `Text Templating` [documentation](https://docs.abp.io/en/abp/latest/Text-Templating#replacing-the-existing-templates). |
||||
|
|
||||
|
* In this article, I will create a email template by using free template generator named **Bee**. You can reach the free templates from [here](https://beefree.io/templates/free/). |
||||
|
|
||||
|
* When we find a template for our purpose, we can hover the link and click the **get started** button to edit the template. (I chose a template named "gdpr".) |
||||
|
|
||||
|
* Here, you can edit your template as below. (You can delete or add sections, edit texts, and so on.) |
||||
|
|
||||
|
 |
||||
|
|
||||
|
> **Note:** After editing our template, we need to export it to reach our created template's content. You can see the **export** button top-right of the template editing page. |
||||
|
|
||||
|
* After choosing and editing our free template, we can create a new **email template** in our project. For this, create a folder named `Templates` under `Emailing` folder in `TemplateReplace.Domain` and add `EmailTemplate.tpl` file inside of it. And copy-paste the below content or your template's content. |
||||
|
|
||||
|
```tpl |
||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml"> |
||||
|
<head> |
||||
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/> |
||||
|
<meta content="width=device-width" name="viewport"/> |
||||
|
<meta content="IE=edge" http-equiv="X-UA-Compatible"/> |
||||
|
<style type="text/css"> |
||||
|
body { |
||||
|
margin: 0; |
||||
|
padding: 0; |
||||
|
} |
||||
|
table, |
||||
|
td, |
||||
|
tr { |
||||
|
vertical-align: top; |
||||
|
border-collapse: collapse; |
||||
|
} |
||||
|
* { |
||||
|
line-height: inherit; |
||||
|
} |
||||
|
a[x-apple-data-detectors=true] { |
||||
|
color: inherit !important; |
||||
|
text-decoration: none !important; |
||||
|
} |
||||
|
</style> |
||||
|
<style id="media-query" type="text/css"> |
||||
|
@media (max-width: 670px) { |
||||
|
.block-grid, |
||||
|
.col { |
||||
|
min-width: 320px !important; |
||||
|
max-width: 100% !important; |
||||
|
display: block !important; |
||||
|
} |
||||
|
.block-grid { |
||||
|
width: 100% !important; |
||||
|
} |
||||
|
.col { |
||||
|
width: 100% !important; |
||||
|
} |
||||
|
.col>div { |
||||
|
margin: 0 auto; |
||||
|
} |
||||
|
img.fullwidth, |
||||
|
img.fullwidthOnMobile { |
||||
|
max-width: 100% !important; |
||||
|
} |
||||
|
.no-stack .col { |
||||
|
min-width: 0 !important; |
||||
|
display: table-cell !important; |
||||
|
} |
||||
|
.no-stack.two-up .col { |
||||
|
width: 50% !important; |
||||
|
} |
||||
|
.no-stack .col.num2 { |
||||
|
width: 16.6% !important; |
||||
|
} |
||||
|
.no-stack .col.num3 { |
||||
|
width: 25% !important; |
||||
|
} |
||||
|
.no-stack .col.num4 { |
||||
|
width: 33% !important; |
||||
|
} |
||||
|
.no-stack .col.num5 { |
||||
|
width: 41.6% !important; |
||||
|
} |
||||
|
.no-stack .col.num6 { |
||||
|
width: 50% !important; |
||||
|
} |
||||
|
.no-stack .col.num7 { |
||||
|
width: 58.3% !important; |
||||
|
} |
||||
|
.no-stack .col.num8 { |
||||
|
width: 66.6% !important; |
||||
|
} |
||||
|
.no-stack .col.num9 { |
||||
|
width: 75% !important; |
||||
|
} |
||||
|
.no-stack .col.num10 { |
||||
|
width: 83.3% !important; |
||||
|
} |
||||
|
.video-block { |
||||
|
max-width: none !important; |
||||
|
} |
||||
|
.mobile_hide { |
||||
|
min-height: 0px; |
||||
|
max-height: 0px; |
||||
|
max-width: 0px; |
||||
|
display: none; |
||||
|
overflow: hidden; |
||||
|
font-size: 0px; |
||||
|
} |
||||
|
.desktop_hide { |
||||
|
display: block !important; |
||||
|
max-height: none !important; |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
|
</head> |
||||
|
<body class="clean-body" style="margin: 0; padding: 0; -webkit-text-size-adjust: 100%; background-color: #3d1554;"> |
||||
|
<table bgcolor="#3d1554" cellpadding="0" cellspacing="0" class="nl-container" role="presentation" style="table-layout: fixed; vertical-align: top; min-width: 320px; border-spacing: 0; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #3d1554; width: 100%;" valign="top" width="100%"> |
||||
|
<tbody> |
||||
|
<tr style="vertical-align: top;" valign="top"> |
||||
|
<td style="word-break: break-word; vertical-align: top;" valign="top"> |
||||
|
<div style="background-color:transparent;overflow:hidden"> |
||||
|
<div class="block-grid" style="min-width: 320px; max-width: 650px; overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; Margin: 0 auto; width: 100%; background-color: transparent;"> |
||||
|
<div style="border-collapse: collapse;display: table;width: 100%;background-color:transparent;"> |
||||
|
<div class="col num12" style="min-width: 320px; max-width: 650px; display: table-cell; vertical-align: top; width: 650px;"> |
||||
|
<div style="width:100% !important;"> |
||||
|
<div style="border-top:0px solid transparent; border-left:0px solid transparent; border-bottom:0px solid transparent; border-right:0px solid transparent; padding-top:35px; padding-bottom:0px; padding-right: 0px; padding-left: 0px;"> |
||||
|
<div align="center" class="img-container center autowidth" style="padding-right: 0px;padding-left: 0px;"></div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div style="background-color:transparent;overflow:hidden"> |
||||
|
<div class="block-grid" style="min-width: 320px; max-width: 650px; overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; Margin: 0 auto; width: 100%; background-color: transparent;"> |
||||
|
<div style="border-collapse: collapse;display: table;width: 100%;background-color:transparent;"> |
||||
|
<div class="col num12" style="min-width: 320px; max-width: 650px; display: table-cell; vertical-align: top; width: 642px;"> |
||||
|
<div style="width:100% !important;"> |
||||
|
<div style="border-top:0px solid transparent; border-left:4px solid #57366E; border-bottom:0px solid transparent; border-right:4px solid #57366E; padding-top:55px; padding-bottom:60px; padding-right: 0px; padding-left: 0px;"> |
||||
|
<div style="color:#fbd711;font-family:Poppins, Arial, Helvetica, sans-serif;line-height:1.2;padding-top:10px;padding-right:10px;padding-bottom:10px;padding-left:10px;"> |
||||
|
<div style="line-height: 1.2; font-size: 12px; color: #fbd711; font-family: Poppins, Arial, Helvetica, sans-serif; mso-line-height-alt: 14px;"> |
||||
|
<p style="font-size: 14px; line-height: 1.2; word-break: break-word; text-align: center; mso-line-height-alt: 17px; margin: 0;"><strong><span style="font-size: 30px;">ABP Community </span></strong></p> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div style="color:#ffffff;font-family:Poppins, Arial, Helvetica, sans-serif;line-height:1.8;padding-top:10px;padding-right:50px;padding-bottom:10px;padding-left:50px;"> |
||||
|
<div style="line-height: 1.8; font-size: 12px; color: #ffffff; font-family: Poppins, Arial, Helvetica, sans-serif; mso-line-height-alt: 22px;"> |
||||
|
<p style="line-height: 1.8; word-break: break-word; font-size: 14px; mso-line-height-alt: 25px; margin: 0;"><span style="font-size: 14px;">Share your experiences with the ABP Framework!</span><br/><span style="font-size: 14px;">ABP is an open source and community driven project. This guide is aims to help anyone wants to contribute to the project.</span></p> |
||||
|
<p style="line-height: 1.8; word-break: break-word; font-size: 14px; mso-line-height-alt: 25px; margin: 0;"><span style="font-size: 14px;">If you want to write articles or "how to" guides related to the ABP Framework and ASP.NET Core, please submit your article to the community.abp.io web site.</span></p> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div align="center" class="button-container" style="padding-top:12px;padding-right:10px;padding-bottom:12px;padding-left:10px;"> |
||||
|
<a href="http://www.example.com/" style="-webkit-text-size-adjust: none; text-decoration: none; display: inline-block; color: #000000; background-color: #fbd711; border-radius: 30px; -webkit-border-radius: 30px; -moz-border-radius: 30px; width: auto; width: auto; border-top: 1px solid #fbd711; border-right: 1px solid #fbd711; border-bottom: 1px solid #fbd711; border-left: 1px solid #fbd711; padding-top: 10px; padding-bottom: 10px; font-family: Poppins, Arial, Helvetica, sans-serif; text-align: center; mso-border-alt: none; word-break: keep-all;" target="_blank"><span style="padding-left:45px;padding-right:45px;font-size:18px;display:inline-block;"><span style="font-size: 16px; line-height: 2; word-break: break-word; mso-line-height-alt: 32px;"><span data-mce-style="font-size: 18px; line-height: 36px;" style="font-size: 18px; line-height: 36px;"><strong>Contribute</strong></span></span></span></a> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</td> |
||||
|
</tr> |
||||
|
</tbody> |
||||
|
</table> |
||||
|
</body> |
||||
|
</html> |
||||
|
``` |
||||
|
|
||||
|
* Then we need to make the template file as "Embedded Resource". We can do this as below. |
||||
|
|
||||
|
* First right click to **EmailTemplate.tpl** and choose `Properties`. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
* Then be sure about build action is **Embedded resource**. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
### Step - 4 (Replacing the Email Template) |
||||
|
|
||||
|
* To replace the current email template with our new email template, we need to override it. To achieve this, create a class named `EmailTemplateDefinitionProvider` under `Emailing` folder in `TemplateReplace.Domain` and fill it with the below content. |
||||
|
|
||||
|
```csharp |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Volo.Abp.Emailing.Templates; |
||||
|
using Volo.Abp.TextTemplating; |
||||
|
|
||||
|
namespace TemplateReplace.Emailing |
||||
|
{ |
||||
|
public class EmailTemplateDefinitionProvider : TemplateDefinitionProvider, ITransientDependency |
||||
|
{ |
||||
|
public override void Define(ITemplateDefinitionContext context) |
||||
|
{ |
||||
|
var emailLayoutTemplate = context.GetOrNull(StandardEmailTemplates.Message); |
||||
|
|
||||
|
emailLayoutTemplate |
||||
|
.WithVirtualFilePath( |
||||
|
"/Emailing/Templates/EmailTemplate.tpl", |
||||
|
isInlineLocalized: true |
||||
|
); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
``` |
||||
|
|
||||
|
* In here we've created a template definition provider class that gets the email layout template and change the virtual file path for the template. |
||||
|
|
||||
|
* This approach allows us to locate templates in any folder instead of the folder defined by the depended module. For more detail, check the [Virtual File System](https://docs.abp.io/en/abp/latest/Virtual-File-System). |
||||
|
|
||||
|
### Step - 5 |
||||
|
|
||||
|
* Lastly, we need to configure the [Virtual File System](https://docs.abp.io/en/abp/latest/Virtual-File-System). To do this open your `TemplateReplaceDomainModule.cs` in `TemplateReplace.Domain` and update the content as below. |
||||
|
|
||||
|
```csharp |
||||
|
using TemplateReplace.MultiTenancy; |
||||
|
using Volo.Abp.AuditLogging; |
||||
|
using Volo.Abp.BackgroundJobs; |
||||
|
using Volo.Abp.Emailing; |
||||
|
using Volo.Abp.FeatureManagement; |
||||
|
using Volo.Abp.Identity; |
||||
|
using Volo.Abp.IdentityServer; |
||||
|
using Volo.Abp.Modularity; |
||||
|
using Volo.Abp.MultiTenancy; |
||||
|
using Volo.Abp.PermissionManagement.Identity; |
||||
|
using Volo.Abp.PermissionManagement.IdentityServer; |
||||
|
using Volo.Abp.SettingManagement; |
||||
|
using Volo.Abp.TenantManagement; |
||||
|
using Volo.Abp.VirtualFileSystem; |
||||
|
|
||||
|
namespace TemplateReplace |
||||
|
{ |
||||
|
[DependsOn( |
||||
|
typeof(TemplateReplaceDomainSharedModule), |
||||
|
typeof(AbpAuditLoggingDomainModule), |
||||
|
typeof(AbpBackgroundJobsDomainModule), |
||||
|
typeof(AbpFeatureManagementDomainModule), |
||||
|
typeof(AbpIdentityDomainModule), |
||||
|
typeof(AbpPermissionManagementDomainIdentityModule), |
||||
|
typeof(AbpIdentityServerDomainModule), |
||||
|
typeof(AbpPermissionManagementDomainIdentityServerModule), |
||||
|
typeof(AbpSettingManagementDomainModule), |
||||
|
typeof(AbpTenantManagementDomainModule), |
||||
|
typeof(AbpEmailingModule) |
||||
|
)] |
||||
|
public class TemplateReplaceDomainModule : AbpModule |
||||
|
{ |
||||
|
public override void ConfigureServices(ServiceConfigurationContext context) |
||||
|
{ |
||||
|
Configure<AbpMultiTenancyOptions>(options => |
||||
|
{ |
||||
|
options.IsEnabled = MultiTenancyConsts.IsEnabled; |
||||
|
}); |
||||
|
|
||||
|
//Add this configuration |
||||
|
Configure<AbpVirtualFileSystemOptions>(options => |
||||
|
{ |
||||
|
options.FileSets.AddEmbedded<TemplateReplaceDomainModule>(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
``` |
||||
|
|
||||
|
* And now when we send a new email, we should see our newly defined template as the message like below. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
## Text Template Management |
||||
|
|
||||
|
* Generally, more than one e-mail is required in applications. We create email templates for **"password changes"** or **"welcome"** etc in our applications. In such cases, it is necessary to create different templates for each mail. ABP Commercial allows us to perform these operations on UI in a simple way. Text Template Management provides UI to easily create and manage email templates. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
* ABP Commercial's [Text Template Management](https://commercial.abp.io/modules/Volo.TextTemplateManagement) module is really fascinating. It makes it super easy to stores and edits template contents. We can list all templates on a page, editing them, localizing them, and so on. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
* ABP Commercial's text template management module, allows us to modify a template through the UI. |
||||
|
|
||||
|
* I highly recommend you to [check it out](https://commercial.abp.io/modules/Volo.TextTemplateManagement). |
||||
|
|
||||
|
## References |
||||
|
|
||||
|
* [Text Templating](https://docs.abp.io/en/abp/latest/Text-Templating) |
||||
|
* [Emailing](https://docs.abp.io/en/abp/latest/Emailing) |
||||
|
* [Virtual File System](https://docs.abp.io/en/abp/latest/Virtual-File-System) |
||||
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 103 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 91 KiB |
@ -0,0 +1,122 @@ |
|||||
|
# How to Setup Azure Active Directory and Integrate Abp Angular Application |
||||
|
|
||||
|
This guide demonstrates how to register an application to Azure Active Directory and integrate AzureAD to an ABP angular application that enables users to sign in using OAuth 2.0 with credentials from **Azure Active Directory**. |
||||
|
|
||||
|
## Authentication Flow |
||||
|
|
||||
|
Abp angular applications use **Authentication Code with PKCE** (specs [here](https://tools.ietf.org/html/rfc7636)) which is the most suitable flow for spa applications by the time this article is written since implicit flow is deprecated. |
||||
|
|
||||
|
The most common question is; |
||||
|
|
||||
|
> Where to put OpenId connection code in angular project? |
||||
|
|
||||
|
The answer is, **you don't**. Abp angular application is integrated with backend code (HttpApi.Host project) where it loads the configurations, **permissions** etc. For none-tiered angular applications, **HttpApi.Host** project also has IdentityServer4 embedded; also serving as **Authorization Server**. Angular application authentication flow is shown below. |
||||
|
|
||||
|
<img src="auth-diagram.jpeg" alt="auth-diagram" style="zoom:50%;" /> |
||||
|
|
||||
|
> What if I want Azure AD as my authorization server and not IdentityServer? |
||||
|
|
||||
|
This means your application will be using AzureAD user store for authentication. By registering both angular app and HttpApi to AzureAD, authentication might work but **authorization won't**. Users need to be registered to Abp identity system for auditing, permissions etc. So the flow should be 3rd party registration. |
||||
|
|
||||
|
## Setting up OpenId Connection |
||||
|
|
||||
|
Lets start with adding OpenId connection. Open the **HttpApiHostModule.cs** and update the **ConfigureAuthentication** method as below: |
||||
|
|
||||
|
```csharp |
||||
|
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear(); |
||||
|
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Add("sub", ClaimTypes.NameIdentifier); |
||||
|
|
||||
|
context.Services.AddAuthentication() |
||||
|
.AddIdentityServerAuthentication(options => |
||||
|
{ |
||||
|
options.Authority = configuration["AuthServer:Authority"]; |
||||
|
options.RequireHttpsMetadata = false; |
||||
|
options.ApiName = "NonTieredAngular"; |
||||
|
options.JwtBackChannelHandler = new HttpClientHandler() |
||||
|
{ |
||||
|
ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator |
||||
|
}; |
||||
|
}) |
||||
|
.AddOpenIdConnect("AzureOpenId", "Azure AD OpenId", options => |
||||
|
{ |
||||
|
options.Authority = "https://login.microsoftonline.com/" + configuration["AzureAd:TenantId"] + "/v2.0/"; |
||||
|
options.ClientId = configuration["AzureAd:ClientId"]; |
||||
|
options.ResponseType = OpenIdConnectResponseType.CodeIdToken; |
||||
|
options.CallbackPath = configuration["AzureAd:CallbackPath"]; |
||||
|
options.ClientSecret = configuration["AzureAd:ClientSecret"]; |
||||
|
options.RequireHttpsMetadata = false; |
||||
|
options.SaveTokens = true; |
||||
|
options.GetClaimsFromUserInfoEndpoint = true; |
||||
|
options.Scope.Add("email"); |
||||
|
}); |
||||
|
``` |
||||
|
|
||||
|
> If you are using tiered (separate identity server) application, open **IdentityServerModule.cs** and add the OpenIdConnection manually to **ConfigureServices** method as following: |
||||
|
|
||||
|
```csharp |
||||
|
public override void ConfigureServices(ServiceConfigurationContext context) |
||||
|
{ |
||||
|
var hostingEnvironment = context.Services.GetHostingEnvironment(); |
||||
|
var configuration = context.Services.GetConfiguration(); |
||||
|
|
||||
|
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear(); |
||||
|
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Add("sub", ClaimTypes.NameIdentifier); |
||||
|
|
||||
|
context.Services.AddAuthentication() |
||||
|
.AddOpenIdConnect("AzureOpenId", "Azure AD OpenId", options => |
||||
|
{ |
||||
|
... // Same configuration above |
||||
|
}); |
||||
|
``` |
||||
|
|
||||
|
Now we can add AzureAD settings. Open the **appsettings.json** located in **HttpApi.Host** project (or **IdentityServer** project if you are using tiered application). Add the following; |
||||
|
|
||||
|
```csharp |
||||
|
"AzureAd": { |
||||
|
"Instance": "https://login.microsoftonline.com/", |
||||
|
"TenantId": "<azureAd-tenant-id>", |
||||
|
"ClientId": "<azureAd-client-id>", |
||||
|
"Domain": "domain.onmicrosoft.com", |
||||
|
"CallbackPath": "/signin-azuread-oidc", |
||||
|
"ClientSecret": "<azureAd-client-secret>" |
||||
|
}, |
||||
|
``` |
||||
|
|
||||
|
Keep on mind that **App.SelfUrl** + **AzureAd.CallbackPath** will be used in AzureAD app registration. We'll update the AzureAd settings after registering the application in Azure Portal. |
||||
|
|
||||
|
## Setting up Azure Active Directory |
||||
|
|
||||
|
Navigate to Manage Azure Active Directory in [azure portal](https://portal.azure.com/). Go to **App registrations** on left side menu and hit New registration. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
Enter a name for your application and **App.SelfUrl** + **AzureAd.CallbackPath** as redirect uri then register. |
||||
|
|
||||
|
<img src="azure-app-register.JPG" alt="azure-app-register" style="zoom:75%;" /> |
||||
|
|
||||
|
Now navigate to **Authentication** on the left menu and enable **ID tokens**. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
We also need to set a client secret. Navigate to **Certificates & secrets** menu on the left and create a new client secret. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
**Copy** the secret and update your appsettings.json **AzureAd.ClientSecret** field. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
Also update your **AzureAd.TenantId** and **AzureAd.ClientId** fields with the information located under **Overview** menu. And that's all. |
||||
|
|
||||
|
Next time you hit login, you should be seeing login screen enabled Azure AD like below. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
# FAQ |
||||
|
|
||||
|
* I am getting errors when trying to login to AzureAD. |
||||
|
* You can check [this article FAQ](https://community.abp.io/articles/how-to-use-the-azure-active-directory-authentication-for-mvc-razor-page-applications-4603b9cf) which covers many errors. |
||||
|
|
||||
|
|
||||
|
* But I don't want my users to see default login screen. I want my users to login **only** from AzureAD. |
||||
|
* You can **mimic** this behaviour by customizing the login page and instantly trigger Azure AD provider click. For more info, you can check [this article](https://community.abp.io/articles/how-to-customize-the-login-page-for-mvc-razor-page-applications-9a40f3cd). |
||||
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 129 KiB |
|
After Width: | Height: | Size: 102 KiB |
|
After Width: | Height: | Size: 120 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 109 KiB |
@ -0,0 +1,317 @@ |
|||||
|
# Using DevExtreme Angular Components With the ABP Framework |
||||
|
|
||||
|
In this article, I will show you how to integrate the [DevExpress Angular components](https://js.devexpress.com/Documentation/Guide/Angular_Components/DevExtreme_Angular_Components/) to a project created using the ABP Framework startup templates. Then I will use the [DataGrid](https://js.devexpress.com/Documentation/Guide/Widgets/DataGrid/Overview/) component to show a list of users on the UI. |
||||
|
|
||||
|
## Create the Project |
||||
|
|
||||
|
Let's create a new web application with the Angular UI using [ABP CLI](https://docs.abp.io/en/abp/latest/CLI#new): |
||||
|
|
||||
|
```shell |
||||
|
abp new DevExtremeAngular -u angular |
||||
|
``` |
||||
|
|
||||
|
> For detail information about how to generate and start up a project, please refer to the [official docs](https://docs.abp.io/en/abp/latest/Getting-Started?UI=NG&DB=EF&Tiered=No). For the scope of this post, we will not go into details of the backend applications. |
||||
|
|
||||
|
## Running the Solution |
||||
|
|
||||
|
### The Server Side |
||||
|
|
||||
|
Server side contains multiple projects in the solution: |
||||
|
|
||||
|
 |
||||
|
|
||||
|
Run following projects in order; |
||||
|
|
||||
|
* Run `DevExtremeAngular.DbMigrator` to create the database and seed the initial data. |
||||
|
* Run `DevExtremeAngular.HttpApi.Host` project to make the backend API up & running. |
||||
|
|
||||
|
### The Angular Application |
||||
|
|
||||
|
Open a command line terminal and navigate to `angular` folder then run `yarn` or `npm install` based on which package you are using. |
||||
|
|
||||
|
After installation process is done, you can start your angular project by running `yarn start` or `npm start`. This command should serve the application and open the application in your default browser. If it doesn't open, you can navigate to http://localhost:4200 in your browser: |
||||
|
|
||||
|
 |
||||
|
|
||||
|
You can login to the application by using following credentials: |
||||
|
|
||||
|
> _Default admin username is **admin** and password is **1q2w3E\***_ |
||||
|
|
||||
|
 |
||||
|
|
||||
|
After successful login, you should be redirected to home page. |
||||
|
|
||||
|
## Install DevExtreme |
||||
|
|
||||
|
You can follow [the guide](https://js.devexpress.com/Documentation/Guide/Angular_Components/Getting_Started/Add_DevExtreme_to_an_Angular_CLI_Application/) provided by **DevExtreme** team or apply the following steps. |
||||
|
|
||||
|
* `npm install devextreme devextreme-angular` or `yarn add devextreme devextreme-angular` |
||||
|
* Import given two following styles in `angular.json` file: |
||||
|
|
||||
|
```javascript |
||||
|
// ... |
||||
|
"styles": [ |
||||
|
// ... |
||||
|
"src/styles.scss", |
||||
|
|
||||
|
"node_modules/devextreme/dist/css/dx.common.css", |
||||
|
"node_modules/devextreme/dist/css/dx.light.css" |
||||
|
] |
||||
|
``` |
||||
|
|
||||
|
* Add `dx-viewport` to classes of `body` in `index.html` |
||||
|
|
||||
|
```html |
||||
|
<body class="bg-light dx-viewport"> |
||||
|
<app-root> |
||||
|
<div class="donut centered"></div> |
||||
|
</app-root> |
||||
|
</body> |
||||
|
``` |
||||
|
|
||||
|
After completing these steps, you need to restart the angular application. |
||||
|
|
||||
|
## Create a lazy Angular Module for DevExtreme Demo |
||||
|
|
||||
|
Let's create a module which will be loaded lazily. |
||||
|
|
||||
|
Open up a terminal and navigate to `angular` to run following command. |
||||
|
|
||||
|
```shell |
||||
|
ng g m dev-extreme --route dev-extreme --module app |
||||
|
``` |
||||
|
|
||||
|
...or with `npx`, if you do not have `angular-cli` installed... |
||||
|
|
||||
|
```shell |
||||
|
npx ng g m dev-extreme --route dev-extreme --module app |
||||
|
``` |
||||
|
|
||||
|
Your terminal should log the following output: |
||||
|
|
||||
|
```shell |
||||
|
CREATE src/app/dev-extreme/dev-extreme-routing.module.ts (361 bytes) |
||||
|
CREATE src/app/dev-extreme/dev-extreme.module.ts (379 bytes) |
||||
|
CREATE src/app/dev-extreme/dev-extreme.component.scss (0 bytes) |
||||
|
CREATE src/app/dev-extreme/dev-extreme.component.html (26 bytes) |
||||
|
CREATE src/app/dev-extreme/dev-extreme.component.spec.ts (655 bytes) |
||||
|
CREATE src/app/dev-extreme/dev-extreme.component.ts (295 bytes) |
||||
|
UPDATE src/app/app-routing.module.ts (362 bytes) |
||||
|
``` |
||||
|
|
||||
|
The Angular CLI has created a module and configured it to lazy-load at `/dev-extreme` path. |
||||
|
|
||||
|
The last step to be able to see our newly created module in the browser, open `route.provider.ts` and edit the array being added into the routes. |
||||
|
|
||||
|
```typescript |
||||
|
// ... |
||||
|
routes.add([ |
||||
|
{ |
||||
|
path: '/', |
||||
|
name: '::Menu:Home', |
||||
|
iconClass: 'fas fa-home', |
||||
|
order: 1, |
||||
|
layout: eLayoutType.application, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/dev-extreme', |
||||
|
name: 'Dev Extreme', |
||||
|
order: 2, |
||||
|
layout: eLayoutType.application, |
||||
|
}, |
||||
|
]); |
||||
|
// ... |
||||
|
``` |
||||
|
|
||||
|
After completing the steps above, you should be able to see `Dev Extreme` on the header and when you click on it, you should be redirected to `/dev-extreme` page and see the following message on the screen. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
## Display users on the dev-extreme page |
||||
|
|
||||
|
For this demo, we will list users on the screen. We already have `admin` as our first user. |
||||
|
|
||||
|
Let's add couple of more to the list in `Administration -> Identity Management -> Users` page. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
Now we are ready to fetch our users and display them on `/dev-extreme` page. |
||||
|
|
||||
|
Firstly, let's create a service for our component. |
||||
|
|
||||
|
Navigate to the `dev-extreme` folder and run following command. If you run this command at the root, the service will be generated next to `app.module.ts` |
||||
|
|
||||
|
```shell |
||||
|
ng g s dev-extreme |
||||
|
``` |
||||
|
|
||||
|
Following files should be created |
||||
|
|
||||
|
```shell |
||||
|
CREATE src/app/dev-extreme/dev-extreme.service.spec.ts (378 bytes) |
||||
|
CREATE src/app/dev-extreme/dev-extreme.service.ts (139 bytes) |
||||
|
``` |
||||
|
|
||||
|
Let's import and inject `IdentityService` as dependency in `dev-extreme.service.ts`. After then, let's create a stream called `users$` to retrieve the users. |
||||
|
|
||||
|
`identityService.getUsers` returns `ABP.PagedResponse` which contains two fields, `items` and `totalCount`. We are only interested in `items` for now. |
||||
|
|
||||
|
When we apply the steps described above, the final version of `dev-extreme.service` should be as follows |
||||
|
|
||||
|
```typescript |
||||
|
import { Injectable } from '@angular/core'; |
||||
|
import { map } from 'rxjs/operators'; |
||||
|
import { IdentityService } from '@abp/ng.identity'; |
||||
|
|
||||
|
@Injectable({ |
||||
|
providedIn: 'root', |
||||
|
}) |
||||
|
export class DevExtremeService { |
||||
|
users$ = this.service.getUsers().pipe(map((result) => result.items)); |
||||
|
|
||||
|
constructor(private service: IdentityService) {} |
||||
|
} |
||||
|
``` |
||||
|
|
||||
|
Now we can simply inject `DevExtremeService` as public and utilize `users$` stream in `dev-extreme.component.ts` as follows: |
||||
|
|
||||
|
```typescript |
||||
|
import { Component } from '@angular/core'; |
||||
|
import { DevExtremeService } from './dev-extreme.service'; |
||||
|
|
||||
|
@Component({ |
||||
|
selector: 'app-dev-extreme', |
||||
|
templateUrl: './dev-extreme.component.html', |
||||
|
styleUrls: ['./dev-extreme.component.scss'], |
||||
|
}) |
||||
|
export class DevExtremeComponent { |
||||
|
constructor(public service: DevExtremeService) {} |
||||
|
} |
||||
|
``` |
||||
|
|
||||
|
And use it within `dev-extreme.component.html` |
||||
|
|
||||
|
```html |
||||
|
<ng-container *ngIf="service.users$ | async as users"> |
||||
|
<ul> |
||||
|
<li *ngFor="let user of users"> |
||||
|
{{ user.name }} |
||||
|
</li> |
||||
|
</ul> |
||||
|
</ng-container> |
||||
|
``` |
||||
|
|
||||
|
This should list names of the users on the screen |
||||
|
|
||||
|
 |
||||
|
|
||||
|
## Use DxDataGrid to list the users |
||||
|
|
||||
|
You can take a look at [demo](https://js.devexpress.com/Demos/WidgetsGallery/Demo/DataGrid/ColumnCustomization/Angular/Light/) provided by **DevExtreme** team or apply the following steps. |
||||
|
|
||||
|
Now, our application is ready to use `dx-data-grid` in `dev-extreme.component.ts` |
||||
|
|
||||
|
Firstly, we need to import `DxDataGridModule` in our module as follows. |
||||
|
|
||||
|
```typescript |
||||
|
// ... |
||||
|
|
||||
|
import { DxDataGridModule } from 'devextreme-angular'; |
||||
|
|
||||
|
@NgModule({ |
||||
|
// ... |
||||
|
imports: [ |
||||
|
// ... |
||||
|
DxDataGridModule |
||||
|
], |
||||
|
}) |
||||
|
export class DevExtremeModule {} |
||||
|
``` |
||||
|
|
||||
|
At this point `dx-data-grid` is avaliable within our module and we can use it in our template. |
||||
|
|
||||
|
Change `dev-extreme.component.html` to the following |
||||
|
|
||||
|
```html |
||||
|
<ng-container *ngIf="service.users$ | async as users"> |
||||
|
<dx-data-grid [dataSource]="users"></dx-data-grid> |
||||
|
</ng-container> |
||||
|
``` |
||||
|
|
||||
|
It should display a table on the screen |
||||
|
|
||||
|
 |
||||
|
|
||||
|
Since, we did not specify any columns, `dx-data-grid` displayed every column avaliable. Let's pick some columns to make it more readable. |
||||
|
|
||||
|
Change `dev-extreme.component.html` to the following: |
||||
|
|
||||
|
```html |
||||
|
<ng-container *ngIf="service.users$ | async as users"> |
||||
|
<dx-data-grid [dataSource]="users"> |
||||
|
<dxi-column dataField="userName"></dxi-column> |
||||
|
<dxi-column dataField="name"></dxi-column> |
||||
|
<dxi-column dataField="surname"></dxi-column> |
||||
|
<dxi-column dataField="email"></dxi-column> |
||||
|
<dxi-column dataField="phoneNumber"></dxi-column> |
||||
|
</dx-data-grid> |
||||
|
</ng-container> |
||||
|
``` |
||||
|
|
||||
|
which will display following table on the screen |
||||
|
|
||||
|
 |
||||
|
|
||||
|
We can also utilize `abpLocalization` pipe to translate the headers of the table. To use `abpLocalization` pipe in our templates, we need to import `CoreModule` from `@abp/ng.core` into our module. |
||||
|
|
||||
|
```typescript |
||||
|
import { CoreModule } from '@abp/ng.core'; |
||||
|
|
||||
|
@NgModule({ |
||||
|
// ... |
||||
|
imports: [ |
||||
|
// ... |
||||
|
CoreModule |
||||
|
], |
||||
|
}) |
||||
|
export class DevExtremeModule {} |
||||
|
``` |
||||
|
|
||||
|
And change the template to the following: |
||||
|
|
||||
|
```html |
||||
|
<ng-container *ngIf="service.users$ | async as users"> |
||||
|
<dx-data-grid [dataSource]="users"> |
||||
|
<dxi-column |
||||
|
dataField="userName" |
||||
|
[caption]="'AbpIdentity::DisplayName:UserName' | abpLocalization" |
||||
|
></dxi-column> |
||||
|
<dxi-column |
||||
|
dataField="name" |
||||
|
[caption]="'AbpIdentity::DisplayName:Name' | abpLocalization" |
||||
|
></dxi-column> |
||||
|
<dxi-column |
||||
|
dataField="surname" |
||||
|
[caption]="'AbpIdentity::DisplayName:Surname' | abpLocalization" |
||||
|
></dxi-column> |
||||
|
<dxi-column |
||||
|
dataField="email" |
||||
|
[caption]="'AbpIdentity::DisplayName:Email' | abpLocalization" |
||||
|
></dxi-column> |
||||
|
<dxi-column |
||||
|
dataField="phoneNumber" |
||||
|
[caption]="'AbpIdentity::DisplayName:PhoneNumber' | abpLocalization" |
||||
|
></dxi-column> |
||||
|
</dx-data-grid> |
||||
|
</ng-container> |
||||
|
``` |
||||
|
|
||||
|
The headers should change when a new language is selected; |
||||
|
|
||||
|
 |
||||
|
|
||||
|
## Conclusion |
||||
|
|
||||
|
In this article, we have seen how to integrate `DevExtreme` angular components into a project generated by `ABP CLI`. |
||||
|
|
||||
|
You can download source code of [the demo here](https://github.com/abpframework/abp-samples/tree/master/DevExtreme-Angular). |
||||
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 828 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 42 KiB |
@ -0,0 +1,160 @@ |
|||||
|
# How to Add Custom Properties to the User Entity |
||||
|
|
||||
|
## Introduction |
||||
|
|
||||
|
In this step-by-step article, I will explain how you can customize the user entity class, which is available in every web application you create using the ABP framework, according to your needs. When you read this article, you will learn how to override the services of built-in modules, extend the entities, extend data transfer objects and customize the user interface in the applications you develop using the ABP framework. |
||||
|
|
||||
|
You can see the screenshots below which we will reach at the end of the article. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
 |
||||
|
|
||||
|
## Preparing the Project |
||||
|
|
||||
|
### Startup template and the initial run |
||||
|
|
||||
|
Abp Framework offers startup templates to get into the work faster. We can create a new startup template using Abp CLI: |
||||
|
|
||||
|
`abp new CustomizeUserDemo` |
||||
|
|
||||
|
> In this article, I will go through the MVC application, but it will work also in the [Angular](https://docs.abp.io/en/abp/latest/Getting-Started?UI=NG&DB=EF&Tiered=No) application. |
||||
|
|
||||
|
After the download is finished, we can run **CustomizeUserDemo.DbMigrator** project to create the database migrations and seed the initial data (admin user, role, etc). Then we can run `CustomizeUserDemo.Web` to see that our application is working. |
||||
|
|
||||
|
> Default admin username is **admin** and password is **1q2w3E\*** |
||||
|
|
||||
|
 |
||||
|
|
||||
|
In this article, we will go through a scenario together and find the solutions to our questions through this scenario. However, since the scenario is not a real-life scenario, it may be strange, please don't get too about this issue :) |
||||
|
|
||||
|
## Step-1 |
||||
|
|
||||
|
Add two new properties to the `AppUser` in the Users folder of the **CustomizeUserDemo.Domain** project as follows: |
||||
|
|
||||
|
```csharp |
||||
|
public string Title { get; protected set; } |
||||
|
|
||||
|
public int Reputation { get; protected set; } |
||||
|
``` |
||||
|
|
||||
|
## Step-2 |
||||
|
|
||||
|
Create the Users folder in the **CustomizeUserDemo.Domain.Shared** project, create the class `UserConsts` inside the folder and update the class you created as below: |
||||
|
|
||||
|
```csharp |
||||
|
public static class UserConsts |
||||
|
{ |
||||
|
public const string TitlePropertyName = "Title"; |
||||
|
|
||||
|
public const string ReputationPropertyName = "Reputation"; |
||||
|
|
||||
|
public const int MaxTitleLength = 64; |
||||
|
|
||||
|
public const double MaxReputationValue = 1_000; |
||||
|
|
||||
|
public const double MinReputationValue = 1; |
||||
|
} |
||||
|
``` |
||||
|
|
||||
|
## Step-3 |
||||
|
|
||||
|
Update the `CustomizeUserDemoEfCoreEntityExtensionMappings` class in the **CustomizeUserDemo.EntityFramework** project in the EntityFrameworkCore folder as below: |
||||
|
|
||||
|
```csharp |
||||
|
public static class CustomizeUserDemoEfCoreEntityExtensionMappings |
||||
|
{ |
||||
|
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); |
||||
|
|
||||
|
public static void Configure() |
||||
|
{ |
||||
|
CustomizeUserDemoGlobalFeatureConfigurator.Configure(); |
||||
|
CustomizeUserDemoModuleExtensionConfigurator.Configure(); |
||||
|
|
||||
|
OneTimeRunner.Run(() => |
||||
|
{ |
||||
|
ObjectExtensionManager.Instance |
||||
|
.MapEfCoreProperty<IdentityUser, string>( |
||||
|
nameof(AppUser.Title), |
||||
|
(entityBuilder, propertyBuilder) => |
||||
|
{ |
||||
|
propertyBuilder.IsRequired(); |
||||
|
propertyBuilder.HasMaxLength(UserConsts.MaxTitleLength); |
||||
|
} |
||||
|
).MapEfCoreProperty<IdentityUser, int>( |
||||
|
nameof(AppUser.Reputation), |
||||
|
(entityBuilder, propertyBuilder) => |
||||
|
{ |
||||
|
propertyBuilder.HasDefaultValue(UserConsts.MinReputationValue); |
||||
|
} |
||||
|
); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
``` |
||||
|
|
||||
|
This class can be used to map these extra properties to table fields in the database. Please read [this](https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities) article to improve your understanding of what we are doing. |
||||
|
|
||||
|
So far, we have added our extra features to the `User` entity and matched these features with the `ef core`. |
||||
|
|
||||
|
Now we need to add migration to see what has changed in our database. This for, open the Package Manager Console (PMC) under the menu Tools > NuGet Package Manager. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
Select the **CustomizeUserDemo.EntityFramework.DbMigrations** as the **default project** and execute the following command: |
||||
|
|
||||
|
```bash |
||||
|
Add-Migration "Updated-User-Entity" |
||||
|
``` |
||||
|
|
||||
|
 |
||||
|
|
||||
|
This will create a new migration class inside the `Migrations` folder of the **CustomizeUserDemo.EntityFrameworkCore.DbMigrations** project. |
||||
|
|
||||
|
> If you are using another IDE than the Visual Studio, you can use `dotnet-ef` tool as [documented here](https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/?tabs=dotnet-core-cli#create-a-migration). |
||||
|
|
||||
|
Finally, run the **CustomizeUserDemo.DbMigrator** project to update the database. |
||||
|
|
||||
|
When we updated the database, you can see that the `Title` and `Reputation` columns are added to the `Users` table. |
||||
|
|
||||
|
 |
||||
|
|
||||
|
## Step-4 |
||||
|
Open the `CustomizeUserDemoModuleExtensionConfigurator` in the **CustomizeUserDemo.Domain.Shared** project, and change the contents of the `ConfigureExtraProperties` method as shown below: |
||||
|
```csharp |
||||
|
private static void ConfigureExtraProperties() |
||||
|
{ |
||||
|
ObjectExtensionManager.Instance.Modules().ConfigureIdentity(identity => |
||||
|
{ |
||||
|
identity.ConfigureUser(user => |
||||
|
{ |
||||
|
user.AddOrUpdateProperty<string>( |
||||
|
UserConsts.TitlePropertyName, |
||||
|
options => |
||||
|
{ |
||||
|
options.Attributes.Add(new RequiredAttribute()); |
||||
|
options.Attributes.Add( |
||||
|
new StringLengthAttribute(UserConsts.MaxTitleLength) |
||||
|
); |
||||
|
} |
||||
|
); |
||||
|
user.AddOrUpdateProperty<int>( |
||||
|
UserConsts.ReputationPropertyName, |
||||
|
options => |
||||
|
{ |
||||
|
options.DefaultValue = UserConsts.MinReputationValue; |
||||
|
options.Attributes.Add( |
||||
|
new RangeAttribute(UserConsts.MinReputationValue, UserConsts.MaxReputationValue) |
||||
|
); |
||||
|
} |
||||
|
); |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
``` |
||||
|
|
||||
|
That's it. Now let's run the application and look at the Identity user page. You can also try to edit and recreate a record if you want, it will work even though we haven't done anything extra. Here is the magic code behind ABP framework. |
||||
|
|
||||
|
If there is a situation you want to add, you can click the contribute button or make a comment. Also, if you like the article, don't forget to share it :) |
||||
|
|
||||
|
Happy coding :) |
||||
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 119 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 94 KiB |
|
After Width: | Height: | Size: 193 KiB |
@ -0,0 +1,65 @@ |
|||||
|
# Distributed Event Bus Rebus Integration |
||||
|
|
||||
|
> This document explains **how to configure the [Rebus](http://mookid.dk/category/rebus/)** as the distributed event bus provider. See the [distributed event bus document](Distributed-Event-Bus.md) to learn how to use the distributed event bus system |
||||
|
|
||||
|
## Installation |
||||
|
|
||||
|
Use the ABP CLI to add [Volo.Abp.EventBus.Rebus](https://www.nuget.org/packages/Volo.Abp.EventBus.Rebus) NuGet package to your project: |
||||
|
|
||||
|
* Install the [ABP CLI](https://docs.abp.io/en/abp/latest/CLI) if you haven't installed before. |
||||
|
* Open a command line (terminal) in the directory of the `.csproj` file you want to add the `Volo.Abp.EventBus.Rebus` package. |
||||
|
* Run `abp add-package Volo.Abp.EventBus.Rebus` command. |
||||
|
|
||||
|
If you want to do it manually, install the [Volo.Abp.EventBus.Rebus](https://www.nuget.org/packages/Volo.Abp.EventBus.Rebus) NuGet package to your project and add `[DependsOn(typeof(AbpEventBusRebusModule))]` to the [ABP module](Module-Development-Basics.md) class inside your project. |
||||
|
|
||||
|
## Configuration |
||||
|
|
||||
|
You can configure using the standard [configuration system](Configuration.md), like using the [options](Options.md) classes. |
||||
|
|
||||
|
### The Options Classes |
||||
|
|
||||
|
`AbpRebusEventBusOptions` classe can be used to configure the event bus options for the Rebus. |
||||
|
|
||||
|
You can configure this options inside the `PreConfigureServices` of your [module](Module-Development-Basics.md). |
||||
|
|
||||
|
**Example: Minimize configuration** |
||||
|
|
||||
|
```csharp |
||||
|
PreConfigure<AbpRebusEventBusOptions>(options => |
||||
|
{ |
||||
|
options.InputQueueName = "eventbus"; |
||||
|
}); |
||||
|
``` |
||||
|
|
||||
|
Rebus has many options, you can use the `Configurer` property of `AbpRebusEventBusOptions` class to configure. |
||||
|
|
||||
|
Default events are **stored in memory**. See the [rebus document](https://github.com/rebus-org/Rebus/wiki/Transport) for more details. |
||||
|
|
||||
|
**Example: Configure the store** |
||||
|
|
||||
|
````csharp |
||||
|
PreConfigure<AbpRebusEventBusOptions>(options => |
||||
|
{ |
||||
|
options.InputQueueName = "eventbus"; |
||||
|
options.Configurer = rebusConfigurer => |
||||
|
{ |
||||
|
rebusConfigurer.Transport(t => t.UseMsmq("eventbus")); |
||||
|
rebusConfigurer.Subscriptions(s => s.UseJsonFile(@"subscriptions.json")); |
||||
|
}; |
||||
|
}); |
||||
|
```` |
||||
|
|
||||
|
You can use the `Publish` properpty of `AbpRebusEventBusOptions` class to change the publishing method |
||||
|
|
||||
|
**Example: Configure the event publishing** |
||||
|
|
||||
|
````csharp |
||||
|
PreConfigure<AbpRebusEventBusOptions>(options => |
||||
|
{ |
||||
|
options.InputQueueName = "eventbus"; |
||||
|
options.Publish = async (bus, type, data) => |
||||
|
{ |
||||
|
await bus.Publish(data); |
||||
|
}; |
||||
|
}); |
||||
|
```` |
||||
@ -1,3 +0,0 @@ |
|||||
## Dynamic JavaScript API Clients |
|
||||
|
|
||||
TODO |
|
||||
@ -0,0 +1,117 @@ |
|||||
|
# ABP Framework 3.3 to 4.0 Migration Guide |
||||
|
|
||||
|
## Auto API Controller Route Changes |
||||
|
|
||||
|
The route calculation for the [Auto API Controllers](https://docs.abp.io/en/abp/latest/API/Auto-API-Controllers) is changing with the ABP Framework version 4.0 ([#5325](https://github.com/abpframework/abp/issues/5325)). Previously, **camelCase** route paths were being used. Beginning from the version 4.0, it uses **kebab-case** route paths where it is possible. |
||||
|
|
||||
|
**A typical auto API before v4.0** |
||||
|
|
||||
|
 |
||||
|
|
||||
|
**camelCase route parts become kebab-case with 4.0** |
||||
|
|
||||
|
 |
||||
|
|
||||
|
If it is hard to change it for your application, you can continue to use the version 3.x route strategy, by following one of the approaches; |
||||
|
|
||||
|
* Set `UseV3UrlStyle` to `true` in the options of the `options.ConventionalControllers.Create(...)` method. Example: |
||||
|
|
||||
|
````csharp |
||||
|
options.ConventionalControllers |
||||
|
.Create(typeof(BookStoreApplicationModule).Assembly, opts => |
||||
|
{ |
||||
|
opts.UseV3UrlStyle = true; |
||||
|
}); |
||||
|
```` |
||||
|
|
||||
|
This approach effects only the controllers for the `BookStoreApplicationModule`. |
||||
|
|
||||
|
* Set `UseV3UrlStyle` to `true` for the `AbpConventionalControllerOptions` to set it globally. Example: |
||||
|
|
||||
|
```csharp |
||||
|
Configure<AbpConventionalControllerOptions>(options => |
||||
|
{ |
||||
|
options.UseV3UrlStyle = true; |
||||
|
}); |
||||
|
``` |
||||
|
|
||||
|
Setting it globally effects all the modules in a modular application. |
||||
|
|
||||
|
## Identity Server Changes |
||||
|
|
||||
|
ABP Framework upgrades the [IdentityServer4](https://www.nuget.org/packages/IdentityServer4) library from 3.x to 4.x with the ABP Framework version 4.0. IdentityServer 4.x has a lot of changes, some of them are **breaking changes in the data structure**. |
||||
|
|
||||
|
### Entity Changes |
||||
|
|
||||
|
Entity changed don't directly affect your application, however it is good to know. |
||||
|
|
||||
|
#### ApiScope |
||||
|
|
||||
|
As the **most important breaking change**, Identity Server 4.x places the `ApiScope` as an independent aggregate root. Previously it was a part of the to `ApiResource` aggregate. This requires manual operation. See the *Database Changes* section. |
||||
|
|
||||
|
Also, added `Enabled(string)` and `Description(bool,true)` properties. |
||||
|
|
||||
|
#### ApiResource |
||||
|
|
||||
|
* Added `AllowedAccessTokenSigningAlgorithms (string)` and `ShowInDiscoveryDocument(bool, default: true)` properties |
||||
|
|
||||
|
#### Client |
||||
|
|
||||
|
* Added `RequireRequestObject (bool)` and `AllowedIdentityTokenSigningAlgorithms (string)` properties. |
||||
|
* Changed default value of `RequireConsent` from `true` to `false`. |
||||
|
* Changed default value of `RequirePkce` from `false` to `true`. |
||||
|
|
||||
|
#### DeviceFlowCodes |
||||
|
|
||||
|
* Added `SessionId (string)` and `Description (string)` properties. |
||||
|
|
||||
|
#### PersistedGrant |
||||
|
|
||||
|
* Added `SessionId (string)` and `Description(string)` and `ConsumedTime (DateTime?)` properties |
||||
|
|
||||
|
### Database Changes |
||||
|
|
||||
|
> Attention: **Please backup your database** before the migration! |
||||
|
|
||||
|
**If you are upgrading from 3.x, then there are some change should be done in your database.** |
||||
|
|
||||
|
#### Database Schema Migration |
||||
|
|
||||
|
If you are using **Entity Framework Core**, you need to add a new database migration, using the `Add-Migration` command, and apply changes to the database. Please **review the migration** script and read the sections below to understand if it affects your existing data. Otherwise, you may **loose some of your configuration**, which may not be easy to remember and re-configure. |
||||
|
|
||||
|
#### Seed Code |
||||
|
|
||||
|
If you haven't customize the `IdentityServerDataSeedContributor` and haven't customized the initial data inside the `IdentityServer*` tables; |
||||
|
|
||||
|
1. Update `IdentityServerDataSeedContributor` class by comparing to [the latest code](https://github.com/abpframework/abp/blob/dev/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs). You probably only need to add the `CreateApiScopesAsync` method and the code related to it. |
||||
|
2. Then you can simply clear all the **table data** in these tables then execute the `DbMigrator` application again to fill it with the new configuration. |
||||
|
|
||||
|
#### Migrating the Configuration Data |
||||
|
|
||||
|
If you've customize your IdentityServer configuration in the database or in the seed data, you should understand the changes and upgrade your code/data accordingly. Especially, the following changes will affect your application: |
||||
|
|
||||
|
- `IdentityServerApiScopes` table's `Enabled` field is dropped and re-created. So, you need to manually enable the api scopes again. |
||||
|
- `IdentityServerApiResourceScopes` table is dropped and recreated. So, you need to backup and move your current data to the new table. |
||||
|
- `IdentityServerIdentityResourceClaims` table is dropped and recreated. So, you need to backup and move your current data to the new table. |
||||
|
|
||||
|
You may need to perform additional steps based on how much you made custom configurations. |
||||
|
|
||||
|
### Other IdentityServer Changes |
||||
|
|
||||
|
IdentityServer has removed the [public origin option](https://github.com/IdentityServer/IdentityServer4/pull/4335). It was resolving http/https conversion problems, but they decided to leave this to the developer. This is especially needed if you use a reverse proxy where your external protocol is HTTPS but internal protocol is HTTP. |
||||
|
|
||||
|
One simple solution is to add such a middleware into your ASP.NET Core pipeline, at the beginning. |
||||
|
|
||||
|
``` |
||||
|
app.Use((httpContext, next) => |
||||
|
{ |
||||
|
httpContext.Request.Scheme = "https"; |
||||
|
return next(); |
||||
|
}); |
||||
|
``` |
||||
|
|
||||
|
> This sample is obtained from the [ASP.NET Core documentation](https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer#scenarios-and-use-cases). You can use it if you always use HTTPS in all environments. |
||||
|
|
||||
|
### Related Resources |
||||
|
* https://leastprivilege.com/2020/06/19/announcing-identityserver4-v4-0/ |
||||
|
* https://github.com/IdentityServer/IdentityServer4/issues/4592 |
||||
@ -0,0 +1,14 @@ |
|||||
|
# Migration Guide for the Blazor UI from the v3.2 to the v3.3 |
||||
|
|
||||
|
## Startup Template Changes |
||||
|
|
||||
|
* Remove `Volo.Abp.Account.Blazor` NuGet package from your `.Blazor.csproj` and add `Volo.Abp.TenantManagement.Blazor` NuGet package. |
||||
|
* Remove the ``typeof(AbpAccountBlazorModule)`` from the dependency list of *YourProjectBlazorModule* class and add the `typeof(AbpTenantManagementBlazorModule)`. |
||||
|
* Add `@using Volo.Abp.BlazoriseUI` and `@using Volo.Abp.BlazoriseUI.Components` into the `_Imports.razor` file. |
||||
|
* Remove the `div` with `id="blazor-error-ui"` (with its contents) from the `wwwroot/index.html ` file, since the ABP Framework now shows error messages as a better message box. |
||||
|
* Update the`AddOidcAuthentication` options in your *YourProjectBlazorModule* class as described in the issue [#5913](https://github.com/abpframework/abp/issues/5913). |
||||
|
|
||||
|
## BlazoriseCrudPageBase to AbpCrudPageBase |
||||
|
|
||||
|
Renamed `BlazoriseCrudPageBase` to `AbpCrudPageBase`. Just update the usages. It also has some changes, you may need to update method calls/usages manually. |
||||
|
|
||||
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 44 KiB |