AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 03.02.2020, 16:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
goshoom: Security API
Источник: http://dev.goshoom.net/en/2020/02/security-api/
==============

The product that used to be called Microsoft Dynamics 365 for Finance and Operations (I truly don’t know how I should call it these days) allows defining security elements both by developers (delivered together with code) and by power users though GUI (stored in database). You may have a need to work with security objects in code and you want to get information from both sources. An API providing a unified view would be handy.

I’m not going to cover it in detail, but let me show you an example: an iteration of security privileges and getting information about security permissions contained in privileges:

using Microsoft.Dynamics.AX.Security.Management.Domain; class SecurityApiDemo{ public static void main(Args _args) { var privilegesRepo = SysSecurity::GetSecurityRepository().Privileges; var privEnumerator = privilegesRepo.LoadAll().GetEnumerator(); while (privEnumerator.MoveNext()) { Privilege privilege = privEnumerator.Current; setPrefix(strFmt("Privilege %1", privilege.Name)); var grantEnumerator = privilege.ActionMenuItemGrants.GetEnumerator(); while (grantEnumerator.MoveNext()) { MenuItemGrant grant = grantEnumerator.Current; info(strFmt("%1 (%2)", grant.Name, grant.Grant.ToString())); } } }}






Apart from ActionMenuItemGrants, there are also DisplayMenuItemGrants, OutputMenuItemGrants, DataEntityGrants, ServiceOperationGrants and DataModelGrants.



Источник: http://dev.goshoom.net/en/2020/02/security-api/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
sertandev: Empowering D365 FO service endpoints with Azure API Management service Blog bot DAX Blogs 0 15.05.2019 22:11
saurav-nav: Microsoft Dynamics NAV 2018 - API Part 4 - Develop Custom API. Blog bot NAV: Blogs 0 02.04.2018 11:11
goshoom: Open API for JSON-based custom services in AX 7 Blog bot DAX Blogs 0 22.07.2017 14:17
goshoom: New metadata API Blog bot DAX Blogs 0 04.11.2016 00:11
Inside Dynamics AX 4.0: The Security Framework Blog bot DAX Blogs 0 31.10.2007 11:40

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 00:10.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.