using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Cim_Client.net;

namespace Bilfinger.HRcules.SuccessFactorData.Model
{
    public class UserRights
    {
        public const string SessionNameUserRights = "userrights";

        public string Idm { get; set; }

        public bool IsAdmin { get; set; }

        public bool IsAuthenticated
        {
            get
            {
                if (IsAdmin ||  (CimOrganisations != null && CimOrganisations.Count() > 0))
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
        }

        public IQueryable<CimOrganisation> CimOrganisations { get; set; }


    }
}
