using System;
using System.Security.Principal;
namespace Csla.Security
{
  /// 
  /// Base class from which custom principal
  /// objects should inherit to operate
  /// properly with the data portal.
  /// 
  [Serializable()]
  public class BusinessPrincipalBase : IPrincipal
  {
    private IIdentity _identity;
    /// 
    /// Returns the user's identity object.
    /// 
    public virtual IIdentity Identity
    {
      get { return _identity; }
    }
    /// 
    /// Returns a value indicating whether the
    /// user is in a given role.
    /// 
    /// Name of the role.
    public virtual bool IsInRole(string role)
    {
      return false;
    }
    /// 
    /// Creates an instance of the object.
    /// 
    /// Identity object for the user.
    protected BusinessPrincipalBase(IIdentity identity)
    {
      _identity = identity;
    }
  }
}