summaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/global-permissions
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-02-02 09:59:36 +0100
committerStas Vilchik <vilchiks@gmail.com>2016-02-19 11:01:56 +0100
commit2ee64e504b6921fd2d2f2d183e425904bc492c9d (patch)
tree37b02f07c7a819f4cd9f41d2a1b83ac37445c376 /server/sonar-web/src/main/js/apps/global-permissions
parent0c2b2d0afe3f28f7075fcadb78a81c59a21b34d3 (diff)
downloadsonarqube-2ee64e504b6921fd2d2f2d183e425904bc492c9d.tar.gz
sonarqube-2ee64e504b6921fd2d2f2d183e425904bc492c9d.zip
SONAR-7122 drop web context from js code
Diffstat (limited to 'server/sonar-web/src/main/js/apps/global-permissions')
-rw-r--r--server/sonar-web/src/main/js/apps/global-permissions/groups-view.js6
-rw-r--r--server/sonar-web/src/main/js/apps/global-permissions/main.js2
-rw-r--r--server/sonar-web/src/main/js/apps/global-permissions/permission.js4
-rw-r--r--server/sonar-web/src/main/js/apps/global-permissions/users-view.js6
4 files changed, 9 insertions, 9 deletions
diff --git a/server/sonar-web/src/main/js/apps/global-permissions/groups-view.js b/server/sonar-web/src/main/js/apps/global-permissions/groups-view.js
index 45a774c3a9d..c29c1eeba85 100644
--- a/server/sonar-web/src/main/js/apps/global-permissions/groups-view.js
+++ b/server/sonar-web/src/main/js/apps/global-permissions/groups-view.js
@@ -22,7 +22,7 @@ import Template from './templates/global-permissions-groups.hbs';
import '../../components/SelectList';
function getSearchUrl (permission, project) {
- var url = baseUrl + '/api/permissions/groups?ps=100&permission=' + permission;
+ var url = '/api/permissions/groups?ps=100&permission=' + permission;
if (project) {
url = url + '&projectId=' + project;
}
@@ -52,8 +52,8 @@ export default Modal.extend({
},
queryParam: 'q',
searchUrl: getSearchUrl(this.options.permission, this.options.project),
- selectUrl: baseUrl + '/api/permissions/add_group',
- deselectUrl: baseUrl + '/api/permissions/remove_group',
+ selectUrl: '/api/permissions/add_group',
+ deselectUrl: '/api/permissions/remove_group',
extra: getExtra(this.options.permission, this.options.project),
selectParameter: 'groupName',
selectParameterValue: 'name',
diff --git a/server/sonar-web/src/main/js/apps/global-permissions/main.js b/server/sonar-web/src/main/js/apps/global-permissions/main.js
index eb420321990..963713722ed 100644
--- a/server/sonar-web/src/main/js/apps/global-permissions/main.js
+++ b/server/sonar-web/src/main/js/apps/global-permissions/main.js
@@ -32,7 +32,7 @@ export default React.createClass({
},
requestPermissions() {
- const url = `${window.baseUrl}/api/permissions/search_global_permissions`;
+ const url = `/api/permissions/search_global_permissions`;
$.get(url).done(r => {
this.setState({ ready: true, permissions: r.permissions });
});
diff --git a/server/sonar-web/src/main/js/apps/global-permissions/permission.js b/server/sonar-web/src/main/js/apps/global-permissions/permission.js
index bb1270ac4b8..32b5bb71ac0 100644
--- a/server/sonar-web/src/main/js/apps/global-permissions/permission.js
+++ b/server/sonar-web/src/main/js/apps/global-permissions/permission.js
@@ -40,7 +40,7 @@ export default React.createClass({
},
requestUsers() {
- const url = `${window.baseUrl}/api/permissions/users`;
+ const url = `/api/permissions/users`;
let data = { permission: this.props.permission.key, ps: MAX_ITEMS };
if (this.props.project) {
data.projectId = this.props.project;
@@ -49,7 +49,7 @@ export default React.createClass({
},
requestGroups() {
- const url = `${window.baseUrl}/api/permissions/groups`;
+ const url = `/api/permissions/groups`;
let data = { permission: this.props.permission.key, ps: MAX_ITEMS };
if (this.props.project) {
data.projectId = this.props.project;
diff --git a/server/sonar-web/src/main/js/apps/global-permissions/users-view.js b/server/sonar-web/src/main/js/apps/global-permissions/users-view.js
index 61c454f3964..980da17df61 100644
--- a/server/sonar-web/src/main/js/apps/global-permissions/users-view.js
+++ b/server/sonar-web/src/main/js/apps/global-permissions/users-view.js
@@ -22,7 +22,7 @@ import Template from './templates/global-permissions-users.hbs';
import '../../components/SelectList';
function getSearchUrl (permission, project) {
- var url = baseUrl + '/api/permissions/users?ps=100&permission=' + permission;
+ var url = '/api/permissions/users?ps=100&permission=' + permission;
if (project) {
url = url + '&projectId=' + project;
}
@@ -52,8 +52,8 @@ export default Modal.extend({
},
queryParam: 'q',
searchUrl: getSearchUrl(this.options.permission, this.options.project),
- selectUrl: baseUrl + '/api/permissions/add_user',
- deselectUrl: baseUrl + '/api/permissions/remove_user',
+ selectUrl: '/api/permissions/add_user',
+ deselectUrl: '/api/permissions/remove_user',
extra: getExtra(this.options.permission, this.options.project),
selectParameter: 'login',
selectParameterValue: 'login',