Commit 5b171090 authored by Tim Olshansky's avatar Tim Olshansky

Merge pull request #37 from garslan/master

adding permissions for project
parents 778e8e19 2c9cd783
......@@ -5,3 +5,5 @@ build/
target/*
*.*~
.gradle
/bin/
/target/
package org.gitlab.api.models;
import org.codehaus.jackson.annotate.JsonProperty;
public class GitlabPersmission {
@JsonProperty("project_access")
private GitlabProjectAccessLevel _projectAccess;
@JsonProperty("group_access")
private GitlabProjectAccessLevel _groupAccess;
public GitlabProjectAccessLevel getProjectAccess() {
return _projectAccess;
}
public GitlabProjectAccessLevel getProjectGroupAccess() {
return _groupAccess;
}
}
package org.gitlab.api.models;
import java.util.Date;
import org.codehaus.jackson.annotate.JsonProperty;
public class GitlabProject {
......@@ -62,6 +63,9 @@ public class GitlabProject {
private boolean _archived;
private GitlabNamespace _namespace;
@JsonProperty("permissions")
private GitlabPersmission _permissions;
public Integer getId() {
return _id;
......@@ -238,4 +242,12 @@ public class GitlabProject {
public void setLastActivityAt(Date lastActivityAt) {
_lastActivityAt = lastActivityAt;
}
public GitlabPersmission getPermissions() {
return _permissions;
}
public void setPermissions(GitlabPersmission permissions) {
this._permissions = permissions;
}
}
package org.gitlab.api.models;
import org.codehaus.jackson.annotate.JsonProperty;
public class GitlabProjectAccessLevel {
@JsonProperty("access_level")
private int _accessLevel;
@JsonProperty("notification_level")
private int _notificationLevel;
public GitlabAccessLevel getAccessLevel() {
return GitlabAccessLevel.fromAccessValue(_accessLevel);
}
public void setAccessLevel(GitlabAccessLevel accessLevel) {
_accessLevel = accessLevel.accessValue;
}
public int getNoficationLevel() {
return _notificationLevel;
}
public void setNoficationLevel(int notificationLevel) {
this._accessLevel=notificationLevel;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment