当前位置: 首页>>代码示例>>C#>>正文


C# IActor.HasPermission方法代码示例

本文整理汇总了C#中IActor.HasPermission方法的典型用法代码示例。如果您正苦于以下问题:C# IActor.HasPermission方法的具体用法?C# IActor.HasPermission怎么用?C# IActor.HasPermission使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IActor的用法示例。


在下文中一共展示了IActor.HasPermission方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GrantDelete

		/// <summary>
		/// Returns empty BusinessRuleCollection indicating that the actor has permissions to delete the data requested.
		/// </summary>
		/// <param name="actor">Actor whose data-access permissions are to be checked.</param>
		/// <returns>Collection of permissions (broken rules) that the actor has failed.</returns>
		/// <remarks>Override in derived classes to add security checks.</remarks>
		public virtual BusinessRuleCollection GrantDelete(IActor actor)
		{
    	BusinessRuleCollection rules = new BusinessRuleCollection();
      BusinessRule rule = new BusinessRule("Entity_GrantDelete", actor.HasPermission(Permissions.CustomerAddress_Delete), "Delete denied on this object.", 1);

      rules.Add(rule);
			return rules;
		}
开发者ID:lordfist,项目名称:FistCore.Lib,代码行数:14,代码来源:CustomerAddress.cs

示例2: GrantSave

		/// <summary>
		/// Returns empty BusinessRuleCollection indicating that the actor has permissions to save the current object.
		/// </summary>
		/// <param name="actor">Actor whose data-access permissions are to be checked.</param>
		/// <returns>Collection of permissions (broken rules) that the actor has failed.</returns>
		/// <remarks>Override in derived classes to add security checks.</remarks>
		public virtual BusinessRuleCollection GrantSave(IActor actor)
		{
    	BusinessRuleCollection rules = new BusinessRuleCollection();
      BusinessRule rule = new BusinessRule("Entity_GrantSave", actor.HasPermission(Permissions.ProductModelProductDescription_Update), "Update denied on this object.", 1);

      rules.Add(rule);
			return rules;
		}
开发者ID:lordfist,项目名称:FistCore.Lib,代码行数:14,代码来源:ProductModelProductDescription.cs

示例3: GrantFetch

		/// <summary>
		/// Returns empty BusinessRuleCollection indicating that the actor has permissions to fetch the data requested.
		/// </summary>
		/// <param name="actor">Actor whose data-access permissions are to be checked.</param>
		/// <returns>Collection of permissions (broken rules) that the actor has failed.</returns>
		/// <remarks>Override in derived classes to add security checks.</remarks>
		public virtual BusinessRuleCollection GrantFetch(IActor actor)
		{
    	BusinessRuleCollection rules = new BusinessRuleCollection();
      BusinessRule rule = new BusinessRule("Entity_GrantFetch", actor.HasPermission(Permissions.Address_Read), "Fetch denied on this object.", 1);

      rules.Add(rule);
			return rules;
		}
开发者ID:lordfist,项目名称:FistCore.Lib,代码行数:14,代码来源:Address.cs

示例4: GrantSave

		/// <summary>
		/// Returns empty BusinessRuleCollection indicating that the actor has permissions to save the current object.
		/// </summary>
		/// <param name="actor">Actor whose data-access permissions are to be checked.</param>
		/// <returns>Collection of permissions (broken rules) that the actor has failed.</returns>
		/// <remarks>Override in derived classes to add security checks.</remarks>
		public virtual BusinessRuleCollection GrantSave(IActor actor)
		{
    	BusinessRuleCollection rules = new BusinessRuleCollection();
      BusinessRule rule = new BusinessRule("Entity_GrantSave", actor.HasPermission(Permissions.SalesOrderDetail_Update), "Update denied on this object.", 1);

      rules.Add(rule);
			return rules;
		}
开发者ID:lordfist,项目名称:FistCore.Lib,代码行数:14,代码来源:SalesOrderDetail.cs

示例5: GrantCreate

		/// <summary>
		/// Returns empty BusinessRuleCollection indicating that the actor has permissions to create the current object.
		/// </summary>
		/// <param name="actor">Actor whose data-access permissions are to be checked.</param>
		/// <returns>Collection of permissions (broken rules) that the actor has failed.</returns>
		/// <remarks>Override in derived classes to add security checks.</remarks>
		public virtual BusinessRuleCollection GrantCreate(IActor actor)
		{
    	BusinessRuleCollection rules = new BusinessRuleCollection();
      BusinessRule rule = new BusinessRule("Entity_GrantCreate", actor.HasPermission(Permissions.Address_Insert), "Create denied on this object.", 1);

      rules.Add(rule);
			return rules;
		}
开发者ID:lordfist,项目名称:FistCore.Lib,代码行数:14,代码来源:Address.cs


注:本文中的IActor.HasPermission方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。