Compare commits

...

20 commits

Author SHA1 Message Date
Pranav Raj S
74c4017d12 email changes 2022-07-21 16:43:42 +05:30
Pranav Raj S
2954d938e7 Change AUTHORIZATION_ERROR_THRESHOLD 2022-07-21 16:35:23 +05:30
Pranav Raj S
681dbeaf46 Increase AUTHORIZATION_ERROR_THRESHOLD 2022-07-21 16:21:23 +05:30
Pranav Raj S
0c0f410727 Revert changes in fetch_imap_emails_job 2022-07-21 15:47:31 +05:30
Pranav Raj S
b9a5b15de1 Merge branch 'develop' into self-hosted/external-enhancemd 2022-07-21 15:45:23 +05:30
Pranav Raj S
53797d8795 Merge branch 'develop' into feat/reorder-sidebar 2022-06-01 17:22:19 +05:30
Pranav Raj S
0910eb550f Catch IMAP Job processing 2022-05-31 20:22:50 +05:30
Pranav Raj S
b68f2e9c92 Disable check for reauthorization 2022-05-30 12:20:10 +05:30
Pranav Raj S
3128529d84 chore: Update reauthorizable 2022-05-25 21:37:11 +05:30
Pranav Raj S
d4bdfa1d53 Merge branch 'develop' into feat/reorder-sidebar 2022-05-05 20:01:17 +05:30
Pranav Raj S
94eb18ee8a Fix Filter 2022-01-12 14:25:59 -08:00
Pranav Raj S
b56fed2435 Revert Changes 2022-01-12 14:21:00 -08:00
Pranav Raj S
02c66e5c1d Merge branch 'master' into feat/reorder-sidebar 2022-01-12 13:57:58 -08:00
Pranav Raj S
65b057d67c Revert "Add secure: true"
This reverts commit 1f42a0f661.
2021-10-04 22:35:02 +05:30
Pranav Raj S
965a8ba3a9 Disable tabs 2021-10-04 22:34:04 +05:30
Pranav Raj S
1f42a0f661 Add secure: true 2021-10-04 20:51:28 +05:30
Pranav Raj S
457368180f Add sameSite to Lax 2021-10-04 20:43:11 +05:30
Pranav Raj S
5f41c1211c Allow iframe requests 2021-10-04 20:36:54 +05:30
Pranav Raj S
444ccfd920 Change to 5.years 2021-10-04 20:30:07 +05:30
Pranav Raj S
f41b30b485 Reorder, remove snooze, delete, sso_auth_token 2021-10-04 17:12:47 +05:30
10 changed files with 25 additions and 13 deletions

View file

@ -4,6 +4,7 @@ class DashboardController < ActionController::Base
before_action :set_global_config before_action :set_global_config
around_action :switch_locale around_action :switch_locale
before_action :ensure_installation_onboarding, only: [:index] before_action :ensure_installation_onboarding, only: [:index]
after_action :allow_iframe_requests
layout 'vueapp' layout 'vueapp'
@ -37,6 +38,10 @@ class DashboardController < ActionController::Base
redirect_to '/installation/onboarding' if ::Redis::Alfred.get(::Redis::Alfred::CHATWOOT_INSTALLATION_ONBOARDING) redirect_to '/installation/onboarding' if ::Redis::Alfred.get(::Redis::Alfred::CHATWOOT_INSTALLATION_ONBOARDING)
end end
def allow_iframe_requests
response.headers.delete('X-Frame-Options')
end
def app_config def app_config
{ {
APP_VERSION: Chatwoot.config[:version], APP_VERSION: Chatwoot.config[:version],

View file

@ -27,7 +27,7 @@ class DeviseOverrides::SessionsController < ::DeviseTokenAuth::SessionsControlle
sign_in(:user, @resource, store: false, bypass: false) sign_in(:user, @resource, store: false, bypass: false)
# invalidate the token after the user is signed in # invalidate the token after the user is signed in
@resource.invalidate_sso_auth_token(params[:sso_auth_token]) # @resource.invalidate_sso_auth_token(params[:sso_auth_token])
end end
def process_sso_auth_token def process_sso_auth_token

View file

@ -9,7 +9,7 @@
{{ pageTitle }} {{ pageTitle }}
</h1> </h1>
<div class="filter--actions"> <div class="filter--actions" :class="{ 'margin-right-small': isIframe }">
<chat-filter <chat-filter
v-if="!hasAppliedFiltersOrActiveFolders" v-if="!hasAppliedFiltersOrActiveFolders"
@statusFilterChange="updateStatusType" @statusFilterChange="updateStatusType"
@ -74,7 +74,7 @@
/> />
<chat-type-tabs <chat-type-tabs
v-if="!hasAppliedFiltersOrActiveFolders" v-if="!hasAppliedFiltersOrActiveFolders && !isIframe"
:items="assigneeTabItems" :items="assigneeTabItems"
:active-tab="activeAssigneeTab" :active-tab="activeAssigneeTab"
class="tab--chat-type" class="tab--chat-type"
@ -234,6 +234,9 @@ export default {
folders: 'customViews/getCustomViews', folders: 'customViews/getCustomViews',
inboxes: 'inboxes/getInboxes', inboxes: 'inboxes/getInboxes',
}), }),
isIframe() {
return window.self !== window.top;
},
hasAppliedFilters() { hasAppliedFilters() {
return this.appliedFilters.length !== 0; return this.appliedFilters.length !== 0;
}, },

View file

@ -33,7 +33,7 @@
> >
{{ this.$t('CONVERSATION.HEADER.OPEN_ACTION') }} {{ this.$t('CONVERSATION.HEADER.OPEN_ACTION') }}
</woot-button> </woot-button>
<woot-button <!-- <woot-button
v-if="showAdditionalActions" v-if="showAdditionalActions"
ref="arrowDownButton" ref="arrowDownButton"
:color-scheme="buttonClass" :color-scheme="buttonClass"
@ -41,7 +41,7 @@
icon="chevron-down" icon="chevron-down"
emoji="🔽" emoji="🔽"
@click="openDropdown" @click="openDropdown"
/> /> -->
</div> </div>
<div <div
v-if="showActionsDropdown" v-if="showActionsDropdown"

View file

@ -1,5 +1,5 @@
<template> <template>
<aside class="woot-sidebar"> <aside v-if="!isIframe" class="woot-sidebar">
<primary-sidebar <primary-sidebar
:logo-source="globalConfig.logoThumbnail" :logo-source="globalConfig.logoThumbnail"
:installation-name="globalConfig.installationName" :installation-name="globalConfig.installationName"
@ -65,6 +65,9 @@ export default {
}, },
computed: { computed: {
isIframe() {
return window.self !== window.top;
},
...mapGetters({ ...mapGetters({
currentUser: 'getCurrentUser', currentUser: 'getCurrentUser',
globalConfig: 'globalConfig/get', globalConfig: 'globalConfig/get',

View file

@ -96,7 +96,7 @@
</div> </div>
</div> </div>
<div v-if="shouldShowContextMenu" class="context-menu-wrap"> <div v-if="shouldShowContextMenu" class="context-menu-wrap">
<context-menu <!-- <context-menu
v-if="isBubble && !isMessageDeleted" v-if="isBubble && !isMessageDeleted"
:is-open="showContextMenu" :is-open="showContextMenu"
:show-copy="hasText" :show-copy="hasText"
@ -104,7 +104,7 @@
@toggle="handleContextMenuClick" @toggle="handleContextMenuClick"
@delete="handleDelete" @delete="handleDelete"
@copy="handleCopy" @copy="handleCopy"
/> /> -->
</div> </div>
</li> </li>
</template> </template>
@ -122,7 +122,7 @@ import BubbleVideo from './bubble/Video.vue';
import BubbleActions from './bubble/Actions'; import BubbleActions from './bubble/Actions';
import Spinner from 'shared/components/Spinner'; import Spinner from 'shared/components/Spinner';
import ContextMenu from 'dashboard/modules/conversations/components/MessageContextMenu'; // import ContextMenu from 'dashboard/modules/conversations/components/MessageContextMenu';
import alertMixin from 'shared/mixins/alertMixin'; import alertMixin from 'shared/mixins/alertMixin';
import contentTypeMixin from 'shared/mixins/contentTypeMixin'; import contentTypeMixin from 'shared/mixins/contentTypeMixin';
@ -137,7 +137,7 @@ export default {
BubbleFile, BubbleFile,
BubbleVideo, BubbleVideo,
BubbleMailHead, BubbleMailHead,
ContextMenu, // ContextMenu,
Spinner, Spinner,
}, },
mixins: [alertMixin, timeMixin, messageFormatterMixin, contentTypeMixin], mixins: [alertMixin, timeMixin, messageFormatterMixin, contentTypeMixin],

View file

@ -27,6 +27,7 @@ export const setAuthCredentials = response => {
const expiryDate = getHeaderExpiry(response); const expiryDate = getHeaderExpiry(response);
Cookies.set('cw_d_session_info', response.headers, { Cookies.set('cw_d_session_info', response.headers, {
expires: differenceInDays(expiryDate, new Date()), expires: differenceInDays(expiryDate, new Date()),
sameSite: 'Lax',
}); });
setUser(response.data.data, expiryDate); setUser(response.data.data, expiryDate);
}; };

View file

@ -36,7 +36,7 @@ class Channel::Email < ApplicationRecord
include Channelable include Channelable
include Reauthorizable include Reauthorizable
AUTHORIZATION_ERROR_THRESHOLD = 10 AUTHORIZATION_ERROR_THRESHOLD = 150
self.table_name = 'channel_email' self.table_name = 'channel_email'
EDITABLE_ATTRS = [:email, :imap_enabled, :imap_login, :imap_password, :imap_address, :imap_port, :imap_enable_ssl, :imap_inbox_synced_at, EDITABLE_ATTRS = [:email, :imap_enabled, :imap_login, :imap_password, :imap_address, :imap_port, :imap_enable_ssl, :imap_inbox_synced_at,

View file

@ -13,7 +13,7 @@
module Reauthorizable module Reauthorizable
extend ActiveSupport::Concern extend ActiveSupport::Concern
AUTHORIZATION_ERROR_THRESHOLD = 2 AUTHORIZATION_ERROR_THRESHOLD = 150
# model attribute # model attribute
def reauthorization_required? def reauthorization_required?

View file

@ -3,7 +3,7 @@ module SsoAuthenticatable
def generate_sso_auth_token def generate_sso_auth_token
token = SecureRandom.hex(32) token = SecureRandom.hex(32)
::Redis::Alfred.setex(sso_token_key(token), true, 5.minutes) ::Redis::Alfred.setex(sso_token_key(token), true, 5.years)
token token
end end