Skip to content

Commit 84d2763

Browse files
committed
TD-5286 Gives framework developers and contributors access to the competency assessments interface
1 parent a930789 commit 84d2763

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

DigitalLearningSolutions.Web/Controllers/CompetencyAssessmentsController/CompetencyAssessments.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ public IActionResult ViewCompetencyAssessments(string tabname, string? searchStr
2525
)
2626
{
2727
var adminId = GetAdminID();
28-
var isWorkforceManager = GetIsWorkforceManager();
29-
var isWorkforceContributor = GetIsWorkforceContributor();
28+
var isWorkforceManager = GetIsWorkforceManager() | GetIsFrameworkDeveloper();
29+
var isWorkforceContributor = GetIsWorkforceContributor() | GetIsFrameworkContributor();
3030
IEnumerable<CompetencyAssessment> competencyAssessments;
3131
if (tabname == "All")
3232
{

DigitalLearningSolutions.Web/Controllers/CompetencyAssessmentsController/CompetencyAssessmentsController.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,15 @@ private bool GetIsWorkforceContributor()
5050
var isWorkforceContributor = User.GetCustomClaimAsBool(CustomClaimTypes.IsWorkforceContributor);
5151
return isWorkforceContributor != null && (bool)isWorkforceContributor;
5252
}
53+
private bool GetIsFrameworkDeveloper()
54+
{
55+
var isFrameworkDeveloper = User.GetCustomClaimAsBool(CustomClaimTypes.IsFrameworkDeveloper);
56+
return isFrameworkDeveloper != null && (bool)isFrameworkDeveloper;
57+
}
58+
private bool GetIsFrameworkContributor()
59+
{
60+
var isFrameworkContributor = User.GetCustomClaimAsBool(CustomClaimTypes.IsFrameworkContributor);
61+
return isFrameworkContributor != null && (bool)isFrameworkContributor;
62+
}
5363
}
5464
}

0 commit comments

Comments
 (0)