Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Admin
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
Terraform modules
Analyze
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Coscine
backend
apis
Admin
Commits
02f147c3
Commit
02f147c3
authored
4 years ago
by
Marcel Nellesen
Browse files
Options
Downloads
Patches
Plain Diff
Removed tests
parent
5fac0a57
No related branches found
No related tags found
1 merge request
!3
Product/1119 quota admin page
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Admin/Admin.csproj
+1
-1
1 addition, 1 deletion
src/Admin/Admin.csproj
src/Admin/Controllers/AdminController.cs
+0
-7
0 additions, 7 deletions
src/Admin/Controllers/AdminController.cs
with
1 addition
and
8 deletions
src/Admin/Admin.csproj
+
1
−
1
View file @
02f147c3
...
...
@@ -26,7 +26,7 @@
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "
>
<PlatformTarget>
AnyCPU
</PlatformTarget>
<PlatformTarget>
x64
</PlatformTarget>
<DebugSymbols>
true
</DebugSymbols>
<DebugType>
full
</DebugType>
<Optimize>
false
</Optimize>
...
...
This diff is collapsed.
Click to expand it.
src/Admin/Controllers/AdminController.cs
+
0
−
7
View file @
02f147c3
...
...
@@ -91,9 +91,6 @@ namespace Coscine.Api.Admin.Controllers
public
ActionResult
<
ProjectObject
>
GetProject
(
string
projectString
)
{
var
user
=
_authenticator
.
GetUserId
();
// remove it when you finished testing and add make a commit!
user
=
"20E60AE8-111D-404A-9FFB-BD52D748F712"
;
if
(!
HasRole
(
user
,
_adminRole
))
{
return
Unauthorized
(
$@"User has not the role: ""
{
_adminRole
}
""."
);
...
...
@@ -138,10 +135,6 @@ namespace Coscine.Api.Admin.Controllers
public
IActionResult
UpdateQuota
([
FromBody
]
UpdateQuotaParameterObject
updateQuotaParameter
)
{
var
user
=
_authenticator
.
GetUserId
();
// Use this for testing or add your user to Virtuoso
// remove it when you finished testing and add make a commit!
user
=
"20E60AE8-111D-404A-9FFB-BD52D748F712"
;
if
(!
HasRole
(
user
,
_adminRole
))
{
return
Unauthorized
(
$@"User has not the role: ""
{
_adminRole
}
""."
);
...
...
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