/// <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;
		}
		/// <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;
		}
Exemple #3
0
		/// <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;
		}
		/// <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;
		}
Exemple #5
0
		/// <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;
		}