diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2013-06-22 10:39:37 +0200 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2013-06-22 10:39:37 +0200 |
commit | 4c998eaa2a58efa25ae08bfe084c3ef76df98644 (patch) | |
tree | 94acb552f8281480ea4689d209f3b3dc6440f153 /gitlab.py | |
parent | a7f206570b2a1a4104a9d6017c9b594fb3e93e13 (diff) | |
download | gitlab-4c998eaa2a58efa25ae08bfe084c3ef76df98644.tar.gz |
gitlab: make the current-user option work
Diffstat (limited to 'gitlab.py')
-rw-r--r-- | gitlab.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -278,6 +278,9 @@ class Gitlab(object): url = obj._url % obj.__dict__ url = '%s%s?private_token=%s' % (self._url, url, self.private_token) + print url + print obj.__dict__ + try: # TODO: avoid too much work on the server side by filtering the # __dict__ keys @@ -529,6 +532,8 @@ class User(GitlabObject): class CurrentUserKey(GitlabObject): _url = '/user/keys' canUpdate = False + shortPrintAttr = 'title' + requiredCreateAttrs = ['title', 'key'] class CurrentUser(GitlabObject): @@ -537,6 +542,7 @@ class CurrentUser(GitlabObject): canCreate = False canUpdate = False canDelete = False + shortPrintAttr = 'username' def Key(self, id=None, **kwargs): if id is None: |