Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-kanban
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ximai
mes-kanban
Commits
2d57d0db
Commit
2d57d0db
authored
Nov 07, 2024
by
沈翠玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
不能登录的问题
parent
127e9578
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
4 deletions
+11
-4
access.ts
src/access.ts
+1
-1
app.tsx
src/app.tsx
+8
-2
AvatarDropdown.tsx
src/components/RightContent/AvatarDropdown.tsx
+1
-1
typing.d.ts
src/services/mgr/typing.d.ts
+1
-0
No files found.
src/access.ts
View file @
2d57d0db
...
...
@@ -7,7 +7,7 @@ export default function access(initialState: {
})
{
const
{
currentUser
,
permissions
}
=
initialState
||
{};
return
{
canAdmin
:
currentUser
&&
currentUser
.
roles
.
some
((
r
)
=>
r
===
'admin'
),
canAdmin
:
currentUser
&&
currentUser
.
roles
&&
currentUser
.
roles
.
some
((
r
)
=>
r
===
'admin'
),
grantAccess
:
(
accessCode
:
string
)
=>
{
return
true
;
},
...
...
src/app.tsx
View file @
2d57d0db
...
...
@@ -189,9 +189,15 @@ export async function getInitialState(): Promise<{
const
fetchUserInfo
=
async
()
=>
{
try
{
const
msg
=
await
queryCurrentUser
();
return
msg
;
console
.
log
(
'msgmsg'
,
msg
)
if
(
msg
&&
msg
.
code
===
200
)
{
return
msg
;
}
else
{
history
.
push
(
loginPath
);
}
}
catch
(
error
)
{
history
.
push
(
loginPath
);
history
.
push
(
loginPath
);
}
return
undefined
;
};
...
...
src/components/RightContent/AvatarDropdown.tsx
View file @
2d57d0db
...
...
@@ -53,7 +53,7 @@ const AvatarDropdown: React.FC<GlobalHeaderRightProps> = ({ menu }) => {
const
{
currentUser
}
=
initialState
;
if
(
!
currentUser
||
!
currentUser
.
user
.
nickName
)
{
if
(
!
currentUser
||
!
currentUser
.
user
||
!
currentUser
.
user
.
nickName
)
{
return
loading
;
}
...
...
src/services/mgr/typing.d.ts
View file @
2d57d0db
...
...
@@ -86,6 +86,7 @@ declare namespace Api {
type
CurrentUser
=
{
user
:
any
;
roles
:
any
[];
code
:
number
;
};
type
CurrentAccount
=
{
...
...
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