PLT-7309: Fix webook management when permitted for non-admins. (#7132)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
82407bd44a
Коммит
5132c62d15
@@ -33,6 +33,20 @@ export function loadIncomingHooks(complete) {
|
||||
);
|
||||
}
|
||||
|
||||
export function loadIncomingHooksForTeam(teamId, complete) {
|
||||
IntegrationActions.getIncomingHooks(teamId, 0, 10000)(dispatch, getState).then(
|
||||
(data) => {
|
||||
if (data) {
|
||||
loadProfilesForIncomingHooks(data);
|
||||
}
|
||||
|
||||
if (complete) {
|
||||
complete(data);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function loadProfilesForIncomingHooks(hooks) {
|
||||
const profilesToLoad = {};
|
||||
for (let i = 0; i < hooks.length; i++) {
|
||||
@@ -64,6 +78,20 @@ export function loadOutgoingHooks(complete) {
|
||||
);
|
||||
}
|
||||
|
||||
export function loadOutgoingHooksForTeam(teamId, complete) {
|
||||
IntegrationActions.getOutgoingHooks('', teamId, 0, 10000)(dispatch, getState).then(
|
||||
(data) => {
|
||||
if (data) {
|
||||
loadProfilesForOutgoingHooks(data);
|
||||
}
|
||||
|
||||
if (complete) {
|
||||
complete(data);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function loadProfilesForOutgoingHooks(hooks) {
|
||||
const profilesToLoad = {};
|
||||
for (let i = 0; i < hooks.length; i++) {
|
||||
|
||||
Ссылка в новой задаче
Block a user