PLT-3484 OAuth2 Service Provider (#3632)
* PLT-3484 OAuth2 Service Provider * PM text review for OAuth 2.0 Service Provider * PLT-3484 OAuth2 Service Provider UI tweaks (#3668) * Tweaks to help text * Pushing OAuth improvements (#3680) * Re-arrange System Console for OAuth 2.0 Provider
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
ea027c8de4
Коммит
5bc3cea6fe
@@ -308,13 +308,6 @@ export function showLeaveTeamModal() {
|
||||
});
|
||||
}
|
||||
|
||||
export function showRegisterAppModal() {
|
||||
AppDispatcher.handleViewAction({
|
||||
type: ActionTypes.TOGGLE_REGISTER_APP_MODAL,
|
||||
value: true
|
||||
});
|
||||
}
|
||||
|
||||
export function emitSuggestionPretextChanged(suggestionId, pretext) {
|
||||
AppDispatcher.handleViewAction({
|
||||
type: ActionTypes.SUGGESTION_PRETEXT_CHANGED,
|
||||
|
||||
60
webapp/actions/oauth_actions.jsx
Обычный файл
60
webapp/actions/oauth_actions.jsx
Обычный файл
@@ -0,0 +1,60 @@
|
||||
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
|
||||
// See License.txt for license information.
|
||||
|
||||
import Client from 'client/web_client.jsx';
|
||||
import AppDispatcher from '../dispatcher/app_dispatcher.jsx';
|
||||
import Constants from 'utils/constants.jsx';
|
||||
|
||||
const ActionTypes = Constants.ActionTypes;
|
||||
|
||||
export function listOAuthApps(userId, onSuccess, onError) {
|
||||
Client.listOAuthApps(
|
||||
(data) => {
|
||||
AppDispatcher.handleServerAction({
|
||||
type: ActionTypes.RECEIVED_OAUTHAPPS,
|
||||
userId,
|
||||
oauthApps: data
|
||||
});
|
||||
|
||||
if (onSuccess) {
|
||||
onSuccess(data);
|
||||
}
|
||||
},
|
||||
onError
|
||||
);
|
||||
}
|
||||
|
||||
export function deleteOAuthApp(id, userId, onSuccess, onError) {
|
||||
Client.deleteOAuthApp(
|
||||
id,
|
||||
() => {
|
||||
AppDispatcher.handleServerAction({
|
||||
type: ActionTypes.REMOVED_OAUTHAPP,
|
||||
userId,
|
||||
id
|
||||
});
|
||||
|
||||
if (onSuccess) {
|
||||
onSuccess();
|
||||
}
|
||||
},
|
||||
onError
|
||||
);
|
||||
}
|
||||
|
||||
export function registerOAuthApp(app, onSuccess, onError) {
|
||||
Client.registerOAuthApp(
|
||||
app,
|
||||
(data) => {
|
||||
AppDispatcher.handleServerAction({
|
||||
type: ActionTypes.RECEIVED_OAUTHAPP,
|
||||
oauthApp: data
|
||||
});
|
||||
|
||||
if (onSuccess) {
|
||||
onSuccess();
|
||||
}
|
||||
},
|
||||
onError
|
||||
);
|
||||
}
|
||||
Ссылка в новой задаче
Block a user