internal static List <string> GetDenyDeleteRoles(Type objectType)
        {
            var typeRules = ObjectAuthorizationRules.GetRoles(objectType);

            return(typeRules.DenyDeleteRoles);
        }
        /// <summary>
        /// Specify the roles not allowed to delete
        /// a given type of business object.
        /// </summary>
        /// <param name="objectType">Type of business object.</param>
        /// <param name="roles">List of roles.</param>
        public static void DenyDelete(Type objectType, params string[] roles)
        {
            var typeRules = ObjectAuthorizationRules.GetRoles(objectType);

            typeRules.DenyDelete(roles);
        }
        internal static List <string> GetAllowEditRoles(Type objectType)
        {
            var typeRules = ObjectAuthorizationRules.GetRoles(objectType);

            return(typeRules.AllowEditRoles);
        }
        /// <summary>
        /// Specify the roles allowed to create
        /// a given type of business object.
        /// </summary>
        /// <param name="objectType">Type of business object.</param>
        /// <param name="roles">List of roles.</param>
        public static void AllowCreate(Type objectType, params string[] roles)
        {
            var typeRules = ObjectAuthorizationRules.GetRoles(objectType);

            typeRules.AllowCreate(roles);
        }