Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1adc83e4
authored
Jul 26, 2025
by
CaIon
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/alpha' into alpha
parents
3243f229
3ea058e0
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
0 deletions
+16
-0
middleware/auth.go
+1
-0
web/src/hooks/mj-logs/useMjLogsData.js
+5
-0
web/src/hooks/task-logs/useTaskLogsData.js
+4
-0
web/src/hooks/usage-logs/useUsageLogsData.js
+6
-0
No files found.
middleware/auth.go
View file @
1adc83e4
...
@@ -122,6 +122,7 @@ func authHelper(c *gin.Context, minRole int) {
...
@@ -122,6 +122,7 @@ func authHelper(c *gin.Context, minRole int) {
c
.
Set
(
"role"
,
role
)
c
.
Set
(
"role"
,
role
)
c
.
Set
(
"id"
,
id
)
c
.
Set
(
"id"
,
id
)
c
.
Set
(
"group"
,
session
.
Get
(
"group"
))
c
.
Set
(
"group"
,
session
.
Get
(
"group"
))
c
.
Set
(
"user_group"
,
session
.
Get
(
"group"
))
c
.
Set
(
"use_access_token"
,
useAccessToken
)
c
.
Set
(
"use_access_token"
,
useAccessToken
)
//userCache, err := model.GetUserCache(id.(int))
//userCache, err := model.GetUserCache(id.(int))
...
...
web/src/hooks/mj-logs/useMjLogsData.js
View file @
1adc83e4
...
@@ -94,6 +94,11 @@ export const useMjLogsData = () => {
...
@@ -94,6 +94,11 @@ export const useMjLogsData = () => {
const
parsed
=
JSON
.
parse
(
savedColumns
);
const
parsed
=
JSON
.
parse
(
savedColumns
);
const
defaults
=
getDefaultColumnVisibility
();
const
defaults
=
getDefaultColumnVisibility
();
const
merged
=
{
...
defaults
,
...
parsed
};
const
merged
=
{
...
defaults
,
...
parsed
};
// If not admin, force hide columns only visible to admins
if
(
!
isAdminUser
)
{
merged
[
COLUMN_KEYS
.
CHANNEL
]
=
false
;
merged
[
COLUMN_KEYS
.
SUBMIT_RESULT
]
=
false
;
}
setVisibleColumns
(
merged
);
setVisibleColumns
(
merged
);
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
error
(
'Failed to parse saved column preferences'
,
e
);
console
.
error
(
'Failed to parse saved column preferences'
,
e
);
...
...
web/src/hooks/task-logs/useTaskLogsData.js
View file @
1adc83e4
...
@@ -92,6 +92,10 @@ export const useTaskLogsData = () => {
...
@@ -92,6 +92,10 @@ export const useTaskLogsData = () => {
const
parsed
=
JSON
.
parse
(
savedColumns
);
const
parsed
=
JSON
.
parse
(
savedColumns
);
const
defaults
=
getDefaultColumnVisibility
();
const
defaults
=
getDefaultColumnVisibility
();
const
merged
=
{
...
defaults
,
...
parsed
};
const
merged
=
{
...
defaults
,
...
parsed
};
// If not admin, force hide columns only visible to admins
if
(
!
isAdminUser
)
{
merged
[
COLUMN_KEYS
.
CHANNEL
]
=
false
;
}
setVisibleColumns
(
merged
);
setVisibleColumns
(
merged
);
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
error
(
'Failed to parse saved column preferences'
,
e
);
console
.
error
(
'Failed to parse saved column preferences'
,
e
);
...
...
web/src/hooks/usage-logs/useUsageLogsData.js
View file @
1adc83e4
...
@@ -116,6 +116,12 @@ export const useLogsData = () => {
...
@@ -116,6 +116,12 @@ export const useLogsData = () => {
const
parsed
=
JSON
.
parse
(
savedColumns
);
const
parsed
=
JSON
.
parse
(
savedColumns
);
const
defaults
=
getDefaultColumnVisibility
();
const
defaults
=
getDefaultColumnVisibility
();
const
merged
=
{
...
defaults
,
...
parsed
};
const
merged
=
{
...
defaults
,
...
parsed
};
// If not admin, force hide columns only visible to admins
if
(
!
isAdminUser
)
{
merged
[
COLUMN_KEYS
.
CHANNEL
]
=
false
;
merged
[
COLUMN_KEYS
.
USERNAME
]
=
false
;
merged
[
COLUMN_KEYS
.
RETRY
]
=
false
;
}
setVisibleColumns
(
merged
);
setVisibleColumns
(
merged
);
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
error
(
'Failed to parse saved column preferences'
,
e
);
console
.
error
(
'Failed to parse saved column preferences'
,
e
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment