[ARVADOS] updated: fb8dd22df54d0c8f87e97f41e1a1677741a47892
git at public.curoverse.com
git at public.curoverse.com
Wed May 14 14:09:21 EDT 2014
Summary of changes:
services/api/app/models/arvados_model.rb | 5 -----
services/api/lib/can_be_an_owner.rb | 3 ++-
services/api/lib/has_uuid.rb | 5 +++++
services/api/test/unit/owner_test.rb | 2 +-
4 files changed, 8 insertions(+), 7 deletions(-)
via fb8dd22df54d0c8f87e97f41e1a1677741a47892 (commit)
via 96b9b6b0a45ffb1965412fe9a12e23d10260ea8e (commit)
via 900f179c96733c2ce9140b2d7767f97feb9eaff6 (commit)
from fb95d0d2d09c9537f5bdc503e51cf4f091d02c46 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit fb8dd22df54d0c8f87e97f41e1a1677741a47892
Author: Tom Clegg <tom at curoverse.com>
Date: Wed May 14 14:05:15 2014 -0400
2762: Fix wrong class used in test case.
diff --git a/services/api/test/unit/owner_test.rb b/services/api/test/unit/owner_test.rb
index df96f31..f159294 100644
--- a/services/api/test/unit/owner_test.rb
+++ b/services/api/test/unit/owner_test.rb
@@ -42,7 +42,7 @@ class OwnerTest < ActiveSupport::TestCase
test "change owner from legit #{o_class} to legit #{new_o_class} owner" do
o = o_class.create
i = Specimen.create(owner_uuid: o.uuid)
- new_o = o_class.create
+ new_o = new_o_class.create
assert(Specimen.where(uuid: i.uuid).any?,
"new item should really be in DB")
assert(i.update_attributes(owner_uuid: new_o.uuid),
commit 96b9b6b0a45ffb1965412fe9a12e23d10260ea8e
Author: Tom Clegg <tom at curoverse.com>
Date: Wed May 14 14:04:44 2014 -0400
2762: Finish enigmatic comment.
diff --git a/services/api/lib/can_be_an_owner.rb b/services/api/lib/can_be_an_owner.rb
index d242b41..16a8783 100644
--- a/services/api/lib/can_be_an_owner.rb
+++ b/services/api/lib/can_be_an_owner.rb
@@ -1,4 +1,5 @@
-# Protect
+# Protect referential integrity of owner_uuid columns in other tables
+# that can refer to the uuid column in this table.
module CanBeAnOwner
commit 900f179c96733c2ce9140b2d7767f97feb9eaff6
Author: Tom Clegg <tom at curoverse.com>
Date: Wed May 14 14:04:20 2014 -0400
2762: Move destroy_permission_links method to HasUuid.
diff --git a/services/api/app/models/arvados_model.rb b/services/api/app/models/arvados_model.rb
index 79237b8..4a717c4 100644
--- a/services/api/app/models/arvados_model.rb
+++ b/services/api/app/models/arvados_model.rb
@@ -237,11 +237,6 @@ class ArvadosModel < ActiveRecord::Base
return true
end
- def destroy_permission_links
- Link.destroy_all(['link_class=? and (head_uuid=? or tail_uuid=?)',
- 'permission', uuid, uuid])
- end
-
def ensure_permission_to_destroy
raise PermissionDeniedError unless permission_to_destroy
end
diff --git a/services/api/lib/has_uuid.rb b/services/api/lib/has_uuid.rb
index 21369d1..d9c8198 100644
--- a/services/api/lib/has_uuid.rb
+++ b/services/api/lib/has_uuid.rb
@@ -31,4 +31,9 @@ module HasUuid
return true if uuid and current_user and current_user.is_admin
self.uuid = self.class.generate_uuid
end
+
+ def destroy_permission_links
+ Link.destroy_all(['link_class=? and (head_uuid=? or tail_uuid=?)',
+ 'permission', uuid, uuid])
+ end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list