import { Injectable } from '@angular/core'; import { HttpClient, HttpHeaders } from '@angular/common/http'; import { environment } from '../../../../../../environments/environment'; import { Observable } from 'rxjs'; @Injectable({ providedIn: 'root' }) export class SecurityService { constructor(private _http : HttpClient) { } getReportOwnerList() : Observable { return this._http.get(environment.baseUrl + "report/wizard/security/retrieveReportOwner"); // return this._http.get("https://e911.dev.att.com/enmt/report/wizard/security/retrieveReportOwner"); } getReportRoleList() : Observable { return this._http.get(environment.baseUrl + "report/wizard/security/retrieveReportRoleList"); // return this._http.get("https://e911.dev.att.com/enmt/report/wizard/security/retrieveReportRoleList"); } getReportSecurityInfo() : Observable { return this._http.get(environment.baseUrl + "report/wizard/security/getReportSecurityInfo"); // return this._http.get("https://e911.dev.att.com/enmt/report/wizard/security/getReportSecurityInfo"); } getReportUserList() : Observable { return this._http.get(environment.baseUrl + "report/wizard/security/retrieveReportUserList"); // return this._http.get("https://e911.dev.att.com/enmt/report/wizard/security/retrieveReportUserList"); } getReportSecurityRoles() : Observable { return this._http.get(environment.baseUrl + "report/wizard/security/getReportSecurityRoles"); // return this._http.get("https://e911.dev.att.com/enmt/report/wizard/security/getReportSecurityRoles"); } addReportUser(reportUserId : string) : Observable { return this._http.post(environment.baseUrl + "report/security/addReportUser", reportUserId, { headers: new HttpHeaders({'Content-Type': 'application/json'})}); // return this._http.post("https://e911.dev.att.com/enmt/report/security/addReportUser", reportUserId, { headers: new HttpHeaders({'Content-Type': 'application/json'})}); } removeReportUser(reportUserId : string) : Observable { return this._http.post(environment.baseUrl + "report/security/removeReportUser", reportUserId, { headers: new HttpHeaders({'Content-Type': 'application/json'})}); // return this._http.post("https://e911.dev.att.com/enmt/report/security/removeReportUser", reportUserId, { headers: new HttpHeaders({'Content-Type': 'application/json'})}); } addUserEditAccess(reportUserId : string, readOnly : string) { return this._http.post(environment.baseUrl + "report/security/toggleUserEditAccess/" + reportUserId, readOnly, { headers: new HttpHeaders({'Content-Type': 'application/json'})}); // return this._http.post("https://e911.dev.att.com/enmt/report/security/toggleUserEditAccess/" + reportUserId, "N", { headers: new HttpHeaders({'Content-Type': 'application/json'})}); } addReportRole(roleId : string) : Observable { return this._http.post(environment.baseUrl + "report/security/addReportRole", roleId, { headers: new HttpHeaders({'Content-Type': 'application/json'})}); } removeReportRole(roleId : string) : Observable { return this._http.post(environment.baseUrl + "report/security/removeReportRole", roleId, { headers: new HttpHeaders({'Content-Type': 'application/json'})}) } addRoleEditAccess(roleId : string, readOnly : string) { return this._http.post(environment.baseUrl + "report/security/toggleRoleEditAccess/" + roleId, readOnly, { headers: new HttpHeaders({'Content-Type': 'application/json'})}); } saveSecurityTabInfo(finalPostObj : any) : Observable { return this._http.post(environment.baseUrl + "report/security/updateReportSecurityInfo", finalPostObj, { headers: new HttpHeaders({'Content-Type': 'application/json'})}); } }