Ejemplo n.º 1
0
        public static bool CanModify(this UserProfile user, IDomainRestricted domain)
        {
            if (user.IsAdministrator)
            {
                return(true);
            }

            return(user.DomainId == domain.DomainId);
        }
Ejemplo n.º 2
0
 public bool CanAccess( IDomainRestricted toCheck )
 {
     return ( this.DomainId == toCheck.DomainId );
 }
Ejemplo n.º 3
0
        /* ---------------------------------------------------------------------------------------------------------- */

        #region Class Members

        #endregion

        /* ---------------------------------------------------------------------------------------------------------- */

        #region Constructors/Initialisation

        #endregion

        /* ---------------------------------------------------------------------------------------------------------- */

        #region Public Methods

        /// <summary>
        /// Determines if the provided entity can be accessed by this domain.
        /// </summary>
        /// <param name="toCheck">The item to check access for.</param>
        public bool CanAccess(IDomainRestricted toCheck)
        {
            return(this.DomainId == toCheck.DomainId);
        }