projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Include all the newly created link objects in the response from the setup method...
[arvados.git]
/
services
/
api
/
app
/
models
/
repository.rb
diff --git
a/services/api/app/models/repository.rb
b/services/api/app/models/repository.rb
index f9be0bf2fcb49673c427817650fd5a6ce30aac15..ad4a84d6c63049a013920b40b14efd5307be9bab 100644
(file)
--- a/
services/api/app/models/repository.rb
+++ b/
services/api/app/models/repository.rb
@@
-3,12
+3,20
@@
class Repository < ArvadosModel
include KindAndEtag
include CommonApiTemplate
include KindAndEtag
include CommonApiTemplate
- api_accessible :
superuser, :extend =>
:common do |t|
+ api_accessible :
user, extend:
:common do |t|
t.add :name
t.add :fetch_url
t.add :push_url
end
t.add :name
t.add :fetch_url
t.add :push_url
end
+ def push_url
+ super || self.name && "git@git.#{Rails.configuration.uuid_prefix}.arvadosapi.com:#{self.name}.git"
+ end
+
+ def fetch_url
+ super || push_url
+ end
+
protected
def permission_to_create
protected
def permission_to_create