Этот коммит содержится в:
Christopher Speller
2015-12-08 13:38:43 -05:00
родитель 4f881046bf
Коммит 58358ddd7c
114 изменённых файлов: 6761 добавлений и 170 удалений

Просмотреть файл

@@ -243,7 +243,7 @@ export function loginByEmail(name, email, password, success, error) {
dataType: 'json',
contentType: 'application/json',
type: 'POST',
data: JSON.stringify({name: name, email: email, password: password}),
data: JSON.stringify({name, email, password}),
success: function onSuccess(data, textStatus, xhr) {
track('api', 'api_users_login_success', data.team_id, 'email', data.email);
BrowserStore.signalLogin();
@@ -258,6 +258,26 @@ export function loginByEmail(name, email, password, success, error) {
});
}
export function loginByLdap(teamName, id, password, success, error) {
$.ajax({
url: '/api/v1/users/login_ldap',
dataType: 'json',
contentType: 'application/json',
type: 'POST',
data: JSON.stringify({teamName, id, password}),
success: function onSuccess(data, textStatus, xhr) {
track('api', 'api_users_loginLdap_success', data.team_id, 'id', id);
success(data, textStatus, xhr);
},
error: function onError(xhr, status, err) {
track('api', 'api_users_loginLdap_fail', teamName, 'id', id);
var e = handleError('loginByLdap', xhr, status, err);
error(e);
}
});
}
export function revokeSession(altId, success, error) {
$.ajax({
url: '/api/v1/users/revoke_session',

Просмотреть файл

@@ -114,6 +114,7 @@ export default {
DEFAULT_CHANNEL: 'town-square',
OFFTOPIC_CHANNEL: 'off-topic',
GITLAB_SERVICE: 'gitlab',
GOOGLE_SERVICE: 'google',
EMAIL_SERVICE: 'email',
POST_CHUNK_SIZE: 60,
MAX_POST_CHUNKS: 3,