Beispiel #1
0
    /// <summary>
    /// Check whether seat is allocated to self(LOGIN USER).
    /// </summary>
    /// <param name="seat"></param>
    /// <returns></returns>
    public bool CheckSelfAllocation(BusinessEntities.SeatAllocation seat)
    {
        try
        {
            BLSeatAllocation = new Rave.HR.BusinessLayer.SeatAllocation.SeatAllocation();

            SeatDetails = new BusinessEntities.SeatAllocation();

            //Get logged in user
            Common.AuthorizationManager.AuthorizationManager objAuMan = new Common.AuthorizationManager.AuthorizationManager();

            string LoggedInuserEmailId = objAuMan.getLoggedInUserEmailId();

            if (LoggedInuserEmailId == seat.EmployeeEmailID)
            {
                result = true;
            }
            return(result);
        }
        catch (RaveHRException ex)
        {
            throw ex;
        }
        catch (Exception ex)
        {
            throw new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, CHECKSELFALLOCATION, EventIDConstants.RAVE_HR_SEATALLOCATION_PRESENTATION_LAYER);
        }
    }
    public void AccessRightForEmployee()
    {
        AuthorizationManager objAuthMgr = new AuthorizationManager();



        if ((!Rave.HR.BusinessLayer.Employee.Employee.CheckDepartmentHeadbyEmailId(objAuthMgr.getLoggedInUserEmailId())) && (!EmployeeRoles.CheckRolesEmployeeSummaryAndProfile()))
        {
            SpanEmpSummary.Visible = false;
        }

        if (!EmployeeRoles.CheckRolesEmployee())
        {
            SpanAddEmployee.Visible = false;
        }

        // Ishwar - NISRMS - 30102014 Start
        string strUserIdentity = string.Empty;

        strUserIdentity = HttpContext.Current.ApplicationInstance.Session["WindowsUsername"].ToString().Trim();

        BusinessEntities.Employee Employee = new BusinessEntities.Employee();
        Rave.HR.BusinessLayer.Employee.Employee employeeBL = new Rave.HR.BusinessLayer.Employee.Employee();
        Employee = employeeBL.GetNISEmployeeList(strUserIdentity);
        if (!String.IsNullOrEmpty(Employee.WindowsUserName))
        {
            if (Employee.WindowsUserName.ToUpper() == strUserIdentity.ToUpper())
            {
                //Employee Profile false for EDC team members
                SpanEmployeeProfile.Visible = false;
            }
        }
        else
        {
            string strNISUsers = string.Empty;
            if (ConfigurationManager.AppSettings["NISReportsAccess"] != null)
            {
                strNISUsers = ConfigurationManager.AppSettings["NISReportsAccess"].ToString();
            }
            Common.AuthorizationManager.AuthorizationManager objAuth = new Common.AuthorizationManager.AuthorizationManager();
            if (!strNISUsers.Contains(objAuth.getLoggedInUser()))
            {
                spanSkillSearchReport.Visible      = false;
                spanHeadCountReport.Visible        = false;
                spanSkillSearchReport.Visible      = false;
                spanSkillReport.Visible            = false;
                spanConsolidated.Visible           = false;
                spanConsolidatedByCostCode.Visible = false;
                // Ishwar - NISRMS - 16022015 Start
                spanMRFAgingReport.Visible = false;
                spanMRFAgingForOpenPositionReport.Visible = false;
                // Ishwar - NISRMS - 16022015 End
            }
        }
        // Ishwar - NISRMS - 30102014 End
    }
    /// <summary>
    /// Check Users Acess Rights For Reports
    /// </summary>
    public void AcessForRMSReports()
    {
        //string strUsers = ConfigurationManager.AppSettings[_reportAccess].ToString();
        string strQualityTeamUsers = string.Empty;

        if (ConfigurationManager.AppSettings[_qualityReportAccess] != null)
        {
            strQualityTeamUsers = ConfigurationManager.AppSettings[_qualityReportAccess].ToString();
        }
        string strRMPTeamUsers = string.Empty;

        if (ConfigurationManager.AppSettings[_rpgReportAccess] != null)
        {
            strRMPTeamUsers = ConfigurationManager.AppSettings[_rpgReportAccess].ToString();
        }

        string strRecruitementTeamUsers = string.Empty;

        if (ConfigurationManager.AppSettings[_recruitmentReportAccess] != null)
        {
            strRecruitementTeamUsers = ConfigurationManager.AppSettings[_recruitmentReportAccess].ToString();
        }

        string strHRTeamUsers = string.Empty;

        if (ConfigurationManager.AppSettings[_hrReportAccess] != null)
        {
            strHRTeamUsers = ConfigurationManager.AppSettings[_hrReportAccess].ToString();
        }

        //Ishwar 26022015 : Start --Desc : Report is not required
        ////27622-Ambar-Start
        //string strSpecialUsers = string.Empty;
        //if (ConfigurationManager.AppSettings[_SpecialReportAccess] != null)
        //{
        //  strSpecialUsers = ConfigurationManager.AppSettings[_SpecialReportAccess].ToString();
        //}
        ////27622-Ambar-End
        //Ishwar 26022015 : End


        //36581-Ambar-Start
        string strOrgChartDetailsUsers = string.Empty;

        if (ConfigurationManager.AppSettings[_OrgChartDetailsReportAccess] != null)
        {
            strOrgChartDetailsUsers = ConfigurationManager.AppSettings[_OrgChartDetailsReportAccess].ToString();
        }
        //36581-Ambar-End

        //Ishwar Patil NIS RMS : 31/10/2014 : Start
        string strNISUsers = string.Empty;

        if (ConfigurationManager.AppSettings["NISReportsAccess"] != null)
        {
            strNISUsers = ConfigurationManager.AppSettings["NISReportsAccess"].ToString();
        }
        //Ishwar Patil NIS RMS : 31/10/2014 : End

        Common.AuthorizationManager.AuthorizationManager objAuth =
            new Common.AuthorizationManager.AuthorizationManager();


        //36581-Ambar-Edited IF Condiction for strOrgChartDetailsUsers (Org Chart Details Report)
        //27622-Ambar-Edited IF Condiction for strSpecialUsers
        if (!strQualityTeamUsers.Contains(objAuth.getLoggedInUser()) &&
            !strRMPTeamUsers.Contains(objAuth.getLoggedInUser()) &&
            !strRecruitementTeamUsers.Contains(objAuth.getLoggedInUser()) &&
            !strHRTeamUsers.Contains(objAuth.getLoggedInUser()) &&
            //!strSpecialUsers.Contains(objAuth.getLoggedInUser()) &&
            !strOrgChartDetailsUsers.Contains(objAuth.getLoggedInUser()) &&
            !strNISUsers.Contains(objAuth.getLoggedInUser())
            )
        {
            tabRMSReports.Visible = false;
        }

        //Ishwar NISRMS : 24022015 Start
        if (strNISUsers.Contains(objAuth.getLoggedInUser()) &&
            !strQualityTeamUsers.Contains(objAuth.getLoggedInUser()) &&
            !strRMPTeamUsers.Contains(objAuth.getLoggedInUser()) &&
            !strRecruitementTeamUsers.Contains(objAuth.getLoggedInUser()) &&
            !strHRTeamUsers.Contains(objAuth.getLoggedInUser()) &&
            //!strSpecialUsers.Contains(objAuth.getLoggedInUser()) &&
            !strOrgChartDetailsUsers.Contains(objAuth.getLoggedInUser())
            )
        {
            spanRMSReports.Visible = false;
            btnRMSReports.Visible  = false;
        }
        //Ishwar NISRMS : 24022015 End
    }
Beispiel #4
0
    //Ishwar 26022015 : Start --Desc : Report is not required
    //protected void BtnWeeklyBenchReport_Click(object sender, EventArgs e)
    //{
    //    GetReport("Weekly Bench Report");
    //}
    ////Ishwar 26022015 : End

    //protected void btnMRFAging_Click(object sender, EventArgs e)
    //{
    //    GetReport("MrfAgingByPrimarySkillAndDesignation");
    //}

    //protected void btnMRFAgingByOpenPosition_Click(object sender, EventArgs e)
    //{
    //    GetReport("MrfAgingByPrimarySkillAndDesignation_RecruitmentAgingReport");
    //}
    #endregion Protected Events

    #region Private Methods
    /// <summary>
    /// Authorize User
    /// </summary>
    public void AuthorizeUserForPageView()
    {
        Common.AuthorizationManager.AuthorizationManager objAuthorizationManager = new Common.AuthorizationManager.AuthorizationManager();
        objAuthorizationManager.AuthorizeUserForPageView(new object[] { Common.AuthorizationManagerConstants.OPERATION_PAGE_CREATERP_VIEW });
    }
Beispiel #5
0
    /// <summary>
    /// page load eventhandler.
    /// </summary>
    protected void Page_Load(object sender, EventArgs e)
    {
        string strQualityTeamUsers = string.Empty;

        if (ConfigurationManager.AppSettings["QualityTeamReportsAccess"] != null)
        {
            strQualityTeamUsers = ConfigurationManager.AppSettings["QualityTeamReportsAccess"].ToString();
        }
        string strRMPTeamUsers = string.Empty;

        if (ConfigurationManager.AppSettings["RPGReportsAccess"] != null)
        {
            strRMPTeamUsers = ConfigurationManager.AppSettings["RPGReportsAccess"].ToString();
        }

        string strRecruitmentTeamUsers = string.Empty;

        if (ConfigurationManager.AppSettings["RecruitmentTeamReportsAccess"] != null)
        {
            strRecruitmentTeamUsers = ConfigurationManager.AppSettings["RecruitmentTeamReportsAccess"].ToString();
        }

        string strHRTeamUsers = string.Empty;

        if (ConfigurationManager.AppSettings["HRTeamReportsAccess"] != null)
        {
            strHRTeamUsers = ConfigurationManager.AppSettings["HRTeamReportsAccess"].ToString();
        }
        //Siddhesh Arekar for Task ID is 55884 : 06/01/2015 : Start
        string strRMOGroupName = string.Empty;

        if (ConfigurationManager.AppSettings["HRTeamReportsAccess"] != null)
        {
            strRMOGroupName = ConfigurationManager.AppSettings["RMOGroupName"].ToString();
        }
        //Siddhesh Arekar for Task ID is 55884 : 06/01/2015 : End

        //Ishwar 26022015 : Start --Desc : Report is not required
        ////27622-Ambar-Start
        //string strSpecialUsers = string.Empty;
        //if (ConfigurationManager.AppSettings["SpecialReport"] != null)
        //{
        //    strSpecialUsers = ConfigurationManager.AppSettings["SpecialReport"].ToString();
        //}
        ////27622-Ambar-End
        //Ishwar 26022015 : End


        //36581-Ambar-Start
        string strOrgChartDetailsUsers = string.Empty;

        if (ConfigurationManager.AppSettings["OrgChartDetailsReport"] != null)
        {
            strOrgChartDetailsUsers = ConfigurationManager.AppSettings["OrgChartDetailsReport"].ToString();
        }
        //36581-Ambar-End

        //Ishwar Patil NIS RMS : 29/10/2014 : Start
        string strNISUsers = string.Empty;

        if (ConfigurationManager.AppSettings["NISReportsAccess"] != null)
        {
            strNISUsers = ConfigurationManager.AppSettings["NISReportsAccess"].ToString();
        }
        //Ishwar Patil NIS RMS : 29/10/2014 : End

        //--Authorise User
        //AuthorizeUserForPageView();
        bool bCheckAccess = false;

        Common.AuthorizationManager.AuthorizationManager objAuth = new Common.AuthorizationManager.AuthorizationManager();
        if ((strQualityTeamUsers != null) && (strQualityTeamUsers.Contains(objAuth.getLoggedInUser())))
        {
            tr_QuailityTeamReport.Visible = true;
            bCheckAccess = true;
        }

        //--
        if ((strRMPTeamUsers != null) && (strRMPTeamUsers.Contains(objAuth.getLoggedInUser())))
        {
            tr_RPMReports.Visible = true;
            bCheckAccess          = true;
        }

        if ((strRecruitmentTeamUsers != null) && (strRecruitmentTeamUsers.Contains(objAuth.getLoggedInUser())))
        {
            tr_RecruitmentTeamReport.Visible = true;
            bCheckAccess = true;
        }


        if ((strHRTeamUsers != null) && (strHRTeamUsers.Contains(objAuth.getLoggedInUser())))
        {
            tr_HRTeamReport.Visible = true;
            bCheckAccess            = true;
        }

        //Ishwar 26022015 : Start --Desc : Report is not required
        ////27622-Ambar-Start
        //if ((strSpecialUsers != null) && (strSpecialUsers.Contains(objAuth.getLoggedInUser())))
        //{
        //    tr_SpecialReport.Visible = true;
        //    bCheckAccess = true;
        //}
        ////27622-Ambar-End
        //Ishwar 26022015 : End


        //36581-Ambar-Start
        if ((strOrgChartDetailsUsers != null) && (strOrgChartDetailsUsers.Contains(objAuth.getLoggedInUser())))
        {
            tr_OrgChartDetailsReport.Visible = true;
            bCheckAccess = true;
        }
        //36581-Ambar-End

        //Ishwar Patil NIS RMS : 29/10/2014 : Start
        //if (((strRMPTeamUsers != null) && (strRMPTeamUsers.Contains(objAuth.getLoggedInUser()))) || ((strNISUsers != null) && (strNISUsers.Contains(objAuth.getLoggedInUser()))))
        //{
        //    tr_NISRMSReport.Visible = true;
        //    bCheckAccess = true;
        //}
        //Ishwar Patil NIS RMS : 29/10/2014 : End

        //--

        //Siddhesh Arekar for Task ID is 55884 : 06/01/2015 : Start
        if ((strRMOGroupName != null) && (strRMOGroupName.Contains(objAuth.getLoggedInUser())))
        {
            tr_MRFClosureStatus.Visible = true;
            bCheckAccess = true;
        }
        //Siddhesh Arekar for Task ID is 55884 : 06/01/2015 : End

        if (!bCheckAccess)
        {
            Response.Redirect("UnAuthorisedUser.htm", false);
        }
    }