Skip to content
Snippets Groups Projects
Commit 4d3a03ea authored by Hanna Führ's avatar Hanna Führ
Browse files

Merge branch 'Issue/2278-gitlabToS' into 'dev'

Update: Adding ToS checkbox for gitlab

See merge request !184
parents 520b7c17 311ff561
Branches Issue/2102-gitLabResTypeRCV
Tags
2 merge requests!185Release: Sprint/2022 22 :robot:,!184Update: Adding ToS checkbox for gitlab
......@@ -383,7 +383,7 @@ namespace Coscine.Database.Models
{
GitlabResourceTypeModel gitlabResourceTypeModel = new GitlabResourceTypeModel();
var gitlabResourceType = gitlabResourceTypeModel.GetById(resource.ResourceTypeOptionId.Value);
resourceTypeOptionObject = new GitlabResourceTypeObject(gitlabResourceType.Id, gitlabResourceType.Branch, gitlabResourceType.GitlabProjectId, gitlabResourceType.RepoUrl, gitlabResourceType.ProjectAccessToken);
resourceTypeOptionObject = new GitlabResourceTypeObject(gitlabResourceType.Id, gitlabResourceType.Branch, gitlabResourceType.GitlabProjectId, gitlabResourceType.RepoUrl, gitlabResourceType.ProjectAccessToken, gitlabResourceType.TosAccepted);
}
else if (resource.Type.Type == "linked" && resource.ResourceTypeOptionId != null)
{
......
......@@ -10,14 +10,16 @@ namespace Coscine.Database.ReturnObjects
public int ProjectId { get; set; }
public Uri RepoUrl { get; set; }
public string AccessToken { get; set; }
public bool TosAccepted { get; set; } = false;
public GitlabResourceTypeObject(Guid id, string branchName, int projectId, string repoUrl, string accessToken)
public GitlabResourceTypeObject(Guid id, string branchName, int projectId, string repoUrl, string accessToken, bool tosaccepted)
{
Id = id;
Branch = branchName;
ProjectId = projectId;
RepoUrl = new Uri(repoUrl);
AccessToken = accessToken;
TosAccepted = tosaccepted;
}
}
}
......@@ -27,7 +27,7 @@ namespace Coscine.Database.ReturnObjects
public Guid? Creator { get; set; }
public bool Archived { get; set; }
public bool Deleted { get; set; }
public ResourceObject(Guid id, string displayName, string resourceName, string description, string keywords, string usageRights, ResourceTypeObject type, IEnumerable<DisciplineObject> disciplines, VisibilityObject visibility, LicenseObject license, JObject resourceTypeOption, string applicationProfile, JToken fixedValues, DateTime? dateCreated, Guid? creator = null, bool archived = false, bool deleted = false)
{
Id = id;
......
......@@ -14,5 +14,6 @@ namespace Coscine.Database.DataModel
public int GitlabProjectId { get; set; }
public string RepoUrl { get; set; }
public string ProjectAccessToken { get; set; }
public bool TosAccepted { get; set; }
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment