mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-05 22:38:48 +00:00
Merge pull request #5389 from ToolJet/merge-main/v2.0.4
Merge main/v2.0.4
This commit is contained in:
commit
dd0015fb39
7 changed files with 12 additions and 7 deletions
2
.version
2
.version
|
|
@ -1 +1 @@
|
|||
2.0.3
|
||||
2.0.4
|
||||
|
|
|
|||
|
|
@ -206,7 +206,10 @@ function resetPassword(params) {
|
|||
function logout() {
|
||||
clearUser();
|
||||
const loginPath = (window.public_config?.SUB_PATH || '/') + 'login';
|
||||
window.location.href = loginPath + `?redirectTo=${window.location.pathname}`;
|
||||
const pathname = window.public_config?.SUB_PATH
|
||||
? window.location.pathname.replace(window.public_config?.SUB_PATH, '')
|
||||
: window.location.pathname;
|
||||
window.location.href = loginPath + `?redirectTo=${!(pathname.indexOf('/') === 0) ? '/' : ''}${pathname}`;
|
||||
}
|
||||
|
||||
function clearUser() {
|
||||
|
|
|
|||
|
|
@ -348,7 +348,7 @@ button {
|
|||
}
|
||||
|
||||
.editor-sidebar {
|
||||
height: 100%;
|
||||
height: calc(100% - 45px);
|
||||
position: fixed;
|
||||
right: 0;
|
||||
overflow-x: hidden;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export default class GraphqlQueryService implements QueryService {
|
|||
|
||||
const json = {
|
||||
query,
|
||||
variables: variables || {},
|
||||
variables: variables ? JSON.parse(variables) : {},
|
||||
};
|
||||
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ export type QueryOptions = {
|
|||
operation: string;
|
||||
query: string;
|
||||
headers?: [string, string][];
|
||||
variables?: object;
|
||||
variables?: string;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
2.0.3
|
||||
2.0.4
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { ExecutionContext, Injectable } from '@nestjs/common';
|
||||
import { AuthGuard } from '@nestjs/passport';
|
||||
import { DataQueriesService } from '@services/data_queries.service';
|
||||
import { maybeSetSubPath } from 'src/helpers/utils.helper';
|
||||
|
||||
@Injectable()
|
||||
export class QueryAuthGuard extends AuthGuard('jwt') {
|
||||
|
|
@ -12,7 +13,8 @@ export class QueryAuthGuard extends AuthGuard('jwt') {
|
|||
const request = context.switchToHttp().getRequest();
|
||||
|
||||
// unauthenticated users should be able to to run queries of public apps
|
||||
if (request.route.path === '/api/data_queries/:id/run') {
|
||||
const apiUrl = maybeSetSubPath('/api/data_queries/:id/run');
|
||||
if (request.route.path === apiUrl) {
|
||||
const dataQuery = await this.dataQueriesService.findOne(request.params.id);
|
||||
const app = dataQuery.dataSource.app;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue