Skip to content

Commit

Permalink
Add project's permissions (#451)
Browse files Browse the repository at this point in the history
* Add project's permissions

* Update PublicAPI.Unshipped.txt

* Changes to 6 files in NGitLab
  • Loading branch information
jairbubbles authored May 29, 2023
1 parent 182572a commit 49ddaa0
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
3 changes: 3 additions & 0 deletions NGitLab/Models/Project.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,5 +203,8 @@ public class Project

[JsonPropertyName("squash_option")]
public DynamicEnum<SquashOption> SquashOption;

[JsonPropertyName("permissions")]
public ProjectPermissions Permissions;
}
}
13 changes: 13 additions & 0 deletions NGitLab/Models/ProjectPermission.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System.Text.Json.Serialization;

namespace NGitLab.Models
{
public class ProjectPermission
{
[JsonPropertyName("access_level")]
public AccessLevel AccessLevel { get; set; }

[JsonPropertyName("notification_level")]
public int NotificationLevel { get; set; }
}
}
13 changes: 13 additions & 0 deletions NGitLab/Models/ProjectPermissions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System.Text.Json.Serialization;

namespace NGitLab.Models
{
public class ProjectPermissions
{
[JsonPropertyName("project_access")]
public ProjectPermission ProjectAccess { get; set; }

[JsonPropertyName("group_access")]
public ProjectPermission GroupAccess { get; set; }
}
}
13 changes: 13 additions & 0 deletions NGitLab/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2512,6 +2512,7 @@ NGitLab.Models.Project.OpenIssuesCount -> int
NGitLab.Models.Project.Owner -> NGitLab.Models.User
NGitLab.Models.Project.Path -> string
NGitLab.Models.Project.PathWithNamespace -> string
NGitLab.Models.Project.Permissions -> NGitLab.Models.ProjectPermissions
NGitLab.Models.Project.PrintingMergeRequestsLinkEnabled -> bool
NGitLab.Models.Project.Project() -> void
NGitLab.Models.Project.Public -> bool
Expand Down Expand Up @@ -2654,6 +2655,18 @@ NGitLab.Models.ProjectMemberUpdate.AccessLevel -> NGitLab.Models.AccessLevel
NGitLab.Models.ProjectMemberUpdate.ExpiresAt -> string
NGitLab.Models.ProjectMemberUpdate.ProjectMemberUpdate() -> void
NGitLab.Models.ProjectMemberUpdate.UserId -> string
NGitLab.Models.ProjectPermission
NGitLab.Models.ProjectPermission.AccessLevel.get -> NGitLab.Models.AccessLevel
NGitLab.Models.ProjectPermission.AccessLevel.set -> void
NGitLab.Models.ProjectPermission.NotificationLevel.get -> int
NGitLab.Models.ProjectPermission.NotificationLevel.set -> void
NGitLab.Models.ProjectPermission.ProjectPermission() -> void
NGitLab.Models.ProjectPermissions
NGitLab.Models.ProjectPermissions.GroupAccess.get -> NGitLab.Models.ProjectPermission
NGitLab.Models.ProjectPermissions.GroupAccess.set -> void
NGitLab.Models.ProjectPermissions.ProjectAccess.get -> NGitLab.Models.ProjectPermission
NGitLab.Models.ProjectPermissions.ProjectAccess.set -> void
NGitLab.Models.ProjectPermissions.ProjectPermissions() -> void
NGitLab.Models.ProjectQuery
NGitLab.Models.ProjectQuery.Archived -> bool?
NGitLab.Models.ProjectQuery.Ascending -> bool?
Expand Down

0 comments on commit 49ddaa0

Please sign in to comment.