Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
STS
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coscine
backend
apis
STS
Commits
b4c5d5de
Commit
b4c5d5de
authored
1 year ago
by
Petar Hristov
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into 'dev'
Master See merge request
!149
parents
9f8009f8
9db15627
No related branches found
No related tags found
2 merge requests
!155
Dev
,
!149
Master
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/STS/Controllers/MergeController.cs
+14
-3
14 additions, 3 deletions
src/STS/Controllers/MergeController.cs
src/STS/STS.csproj
+1
-1
1 addition, 1 deletion
src/STS/STS.csproj
with
15 additions
and
4 deletions
src/STS/Controllers/MergeController.cs
+
14
−
3
View file @
b4c5d5de
...
...
@@ -86,14 +86,14 @@ namespace Coscine.Api.STS.Controllers
}
}
if
(
validMerge
&&
contents
!=
null
&&
contents
.
Any
((
claim
)
=>
claim
.
Type
==
"UserGuid"
))
if
(
validMerge
&&
contents
?
.
Any
((
claim
)
=>
claim
.
Type
==
"UserGuid"
)
==
true
)
{
var
userGuidString
=
contents
.
Where
((
claim
)
=>
claim
.
Type
==
"UserGuid"
)
.
First
()
;
var
userGuidString
=
contents
.
First
((
claim
)
=>
claim
.
Type
==
"UserGuid"
);
var
correctGuid
=
Guid
.
TryParse
(
userGuidString
.
Value
,
out
Guid
userGuid
);
if
(
correctGuid
)
{
var
userList
=
userModel
.
GetAllWhere
((
user
)
=>
user
.
Id
==
userGuid
);
if
(
userList
.
Count
()
>
0
)
if
(
userList
.
Any
()
)
{
var
mergeIntoUser
=
userList
.
First
();
...
...
@@ -116,7 +116,18 @@ namespace Coscine.Api.STS.Controllers
}
}
}
}
else
if
(
contents
?.
Any
((
claim
)
=>
claim
.
Type
==
"UserGuid"
)
==
true
)
{
var
userGuidString
=
contents
.
First
((
claim
)
=>
claim
.
Type
==
"UserGuid"
);
var
coscineUser
=
new
CoscineUser
()
{
UserName
=
userGuidString
.
Value
,
Email
=
""
};
await
_signInManager
.
SignInAsync
(
coscineUser
,
isPersistent
:
false
);
return
Redirect
(
UrlGenerator
.
ExtendReturnUrl
(
returnUrl
,
Request
));
}
string
loginUrl
=
UrlGenerator
.
GetLoginUrl
(
Request
);
...
...
This diff is collapsed.
Click to expand it.
src/STS/STS.csproj
+
1
−
1
View file @
b4c5d5de
...
...
@@ -6,7 +6,7 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TargetFramework>net6.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Version>4.
0.9
</Version>
<Version>4.
1.0
</Version>
</PropertyGroup>
<PropertyGroup>
<Authors>RWTH Aachen University</Authors>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment