private bool ValidateAuthorizeKPI(int kpiId) { var response = new DSLNG.PEAR.Services.Responses.Kpi.GetKpiDetailResponse(); if (this.UserProfile().IsSuperAdmin) { return(true); } response = _kpiService.GetKpiDetail(new Services.Requests.Kpi.GetKpiRequest { Id = kpiId }); if (response.IsSuccess) { if (response.RoleGroup == this.UserProfile().RoleName) { return(true); } else { return(false); } } return(false); }
private bool ValidateAuthorizeKPI(int kpiId) { var response = new DSLNG.PEAR.Services.Responses.Kpi.GetKpiDetailResponse(); if (this.UserProfile().IsSuperAdmin) return true; response = _kpiService.GetKpiDetail(new Services.Requests.Kpi.GetKpiRequest { Id = kpiId }); if (response.IsSuccess) { if (response.RoleGroup == this.UserProfile().RoleName) { return true; } else return false; } return false; }