[ARVADOS] updated: 949ed4898bc5af8eaf0fdd21c00f7242168cfe22
git at public.curoverse.com
git at public.curoverse.com
Mon Jul 21 15:02:58 EDT 2014
Summary of changes:
.../app/assets/javascripts/pipeline_instances.js | 6 ++
.../app/assets/javascripts/select_modal.js | 3 +
apps/workbench/app/assets/javascripts/sizing.js | 1 +
apps/workbench/app/assets/javascripts/tab_panes.js | 38 +++++++++
.../app/controllers/projects_controller.rb | 43 +++++++++-
apps/workbench/app/helpers/application_helper.rb | 61 +++++++-------
apps/workbench/app/models/arvados_base.rb | 4 +
apps/workbench/app/models/arvados_resource_list.rb | 7 ++
apps/workbench/app/models/link.rb | 10 +++
.../app/views/application/_choose.html.erb | 15 ++--
.../app/views/application/_content.html.erb | 48 +----------
.../views/application/_projects_tree_menu.html.erb | 2 +-
.../_choose_rows.html.erb | 5 +-
.../app/views/layouts/application.html.erb | 2 +-
.../pipeline_instances/_show_components.html.erb | 2 +-
.../app/views/pipeline_instances/show.html.erb | 6 --
.../app/views/projects/_show_permissions.html.erb | 44 ----------
.../app/views/projects/_show_sharing.html.erb | 95 ++++++++++++++++++++++
.../_choose_rows.html.erb | 7 +-
apps/workbench/config/routes.rb | 6 +-
.../test/functional/projects_controller_test.rb | 73 +++++++++++++++++
apps/workbench/test/integration/projects_test.rb | 73 +++++++++++++++--
apps/workbench/test/unit/group_test.rb | 9 ++
apps/workbench/test/unit/link_test.rb | 47 ++++++++++-
apps/workbench/test/unit/user_test.rb | 8 ++
sdk/python/MANIFEST.in | 1 +
sdk/python/setup.py | 2 +-
.../app/controllers/arvados/v1/links_controller.rb | 14 +++-
.../app/controllers/user_sessions_controller.rb | 6 +-
.../api/app/models/api_client_authorization.rb | 2 +-
services/api/app/models/arvados_model.rb | 34 ++++----
services/api/app/models/link.rb | 11 +++
services/api/test/fixtures/groups.yml | 11 +++
services/api/test/fixtures/links.yml | 17 ++++
services/api/test/fixtures/users.yml | 21 +++++
.../functional/arvados/v1/links_controller_test.rb | 67 +++++++++++++++
services/api/test/unit/link_test.rb | 42 ++++++++++
services/api/test/unit/permission_test.rb | 31 +++++++
services/fuse/MANIFEST.in | 1 +
services/fuse/arvados_fuse/__init__.py | 6 +-
services/fuse/bin/arv-mount | 59 ++++++++++----
services/fuse/setup.py | 2 +-
42 files changed, 743 insertions(+), 199 deletions(-)
create mode 100644 apps/workbench/app/assets/javascripts/tab_panes.js
copy apps/workbench/app/views/{pipeline_templates => groups}/_choose_rows.html.erb (57%)
delete mode 100644 apps/workbench/app/views/projects/_show_permissions.html.erb
create mode 100644 apps/workbench/app/views/projects/_show_sharing.html.erb
copy apps/workbench/app/views/{pipeline_templates => users}/_choose_rows.html.erb (50%)
create mode 100644 sdk/python/MANIFEST.in
create mode 100644 services/fuse/MANIFEST.in
via 949ed4898bc5af8eaf0fdd21c00f7242168cfe22 (commit)
via 589d2b599714a5e3c239aa25029f1a0a4261f520 (commit)
via 5fdfe4ca7ea91f3da518e6b20d970bf6fcd5ba8c (commit)
via e8e0eecb50f527461216631c0e8a1888afecb812 (commit)
via d5b8f4baf23f0b79e2f9b559b1da6f8898292f9f (commit)
via e3a4fe6e461ec3ffde76e973ada7abae52faf050 (commit)
via fe8e80e434724578b29d79038a75f677df2ad400 (commit)
via 2fccbc1d172fe4bd680651261adfdca8f1ba2a63 (commit)
via 46a7d27450216b1e022d23396931aa1b46c58c73 (commit)
via 189016bba4c9c0ef2f66663dd8ff38843c8b25e1 (commit)
via 13f5b1cf8db5a63b825c3dc81520c69500376adb (commit)
via 67e443d5d1e4a6b6dfe671b3f4310258d386e4f2 (commit)
via 54050447a56ab3e019746f12eb36b026dd5d2fb0 (commit)
via 83f2087d9950975591ce5fe9c7f7c9e5db6749d9 (commit)
via 1b785fd50c259eb42cd2c8c4ba2e440d7bfe0032 (commit)
via 8d3335359e3785be35818b0c4519cc499f3f2fa8 (commit)
via 230ac956317ec9389252240de934edc168098a76 (commit)
via 1e5c714b22c71578106890a2255c3e5470102af3 (commit)
via 68aa07e5c152fd573e254614b34b71957b50ad8c (commit)
via 3c2d73031843545d70a2d38542c79a99f270d207 (commit)
via 6d3186381b3e6f4735892e4d8198ae4d0ca32cf5 (commit)
via 6a2406f04875497a7bfad72fc8bcd73b792fefae (commit)
via d188143b2acd99dc594231360eeaf3e178794ff8 (commit)
via f38d011a7289e2c1819dd7cbb76a738a24e9c825 (commit)
via 5f65177301647eca4b488b9d33fd62295a9bb081 (commit)
via 690bfc8b3d22f9b9bf80328b5758462f315cc1b3 (commit)
from a7824d56a519db6d729323ca56e653db7e895f3c (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 949ed4898bc5af8eaf0fdd21c00f7242168cfe22
Merge: a7824d5 589d2b5
Author: radhika <radhika at curoverse.com>
Date: Mon Jul 21 15:02:25 2014 -0400
Merge branch 'master' into 3140-project-content-tabs
Conflicts:
apps/workbench/app/controllers/projects_controller.rb
diff --cc apps/workbench/app/controllers/projects_controller.rb
index 6e62b5c,31cb5ef..118a467
--- a/apps/workbench/app/controllers/projects_controller.rb
+++ b/apps/workbench/app/controllers/projects_controller.rb
@@@ -8,7 -8,11 +8,11 @@@ class ProjectsController < ApplicationC
end
def show_pane_list
- %w(Data_collections Jobs_and_pipelines Pipeline_templates Subprojects Other_objects Permissions Advanced)
+ if @user_is_manager
- %w(Contents Sharing Advanced)
++ %w(Data_collections Jobs_and_pipelines Pipeline_templates Subprojects Other_objects Sharing Advanced)
+ else
- %w(Contents Advanced)
++ %w(Data_collections Jobs_and_pipelines Pipeline_templates Subprojects Other_objects Advanced)
+ end
end
def remove_item
@@@ -79,14 -83,40 +83,26 @@@
end
@objects = @object.contents(limit: 50,
include_linked: true,
+ filters: params[:filters],
offset: params[:offset] || 0)
- @share_links = Link.filter([['head_uuid', '=', @object.uuid],
- ['link_class', '=', 'permission']])
@logs = Log.limit(10).filter([['object_uuid', '=', @object.uuid]])
+ @users = User.limit(10000).
+ select(["uuid", "is_active", "first_name", "last_name"]).
+ filter([['is_active', '=', 'true']])
+ @groups = Group.limit(10000).
+ select(["uuid", "name", "description"])
+
+ begin
+ @share_links = Link.permissions_for(@object)
+ @user_is_manager = true
+ rescue ArvadosApiClient::AccessForbiddenException,
+ ArvadosApiClient::NotFoundException
+ @share_links = []
+ @user_is_manager = false
+ end
- @objects_and_names = []
- @objects.each do |object|
- if !(name_links = @objects.links_for(object, 'name')).empty?
- name_links.each do |name_link|
- @objects_and_names << [object, name_link]
- end
- elsif object.respond_to? :name
- @objects_and_names << [object, object]
- else
- @objects_and_names << [object,
- Link.new(owner_uuid: @object.uuid,
- tail_uuid: @object.uuid,
- head_uuid: object.uuid,
- link_class: "name",
- name: "")]
- end
- end
+ @objects_and_names = get_objects_and_names @objects
+
if params[:partial]
respond_to do |f|
f.json {
@@@ -118,26 -148,25 +134,47 @@@
super
end
+ helper_method :get_objects_and_names
+ def get_objects_and_names(objects)
+ objects_and_names = []
+ objects.each do |object|
+ if !(name_links = objects.links_for(object, 'name')).empty?
+ name_links.each do |name_link|
+ objects_and_names << [object, name_link]
+ end
+ elsif object.respond_to? :name
+ objects_and_names << [object, object]
+ else
+ objects_and_names << [object,
+ Link.new(owner_uuid: @object.uuid,
+ tail_uuid: @object.uuid,
+ head_uuid: object.uuid,
+ link_class: "name",
+ name: "")]
+ end
+ end
+ objects_and_names
+ end
+
+ def share_with
+ if not params[:uuids].andand.any?
+ @errors = ["No user/group UUIDs specified to share with."]
+ return render_error(status: 422)
+ end
+ results = {"success" => [], "failure" => {}}
+ params[:uuids].each do |shared_uuid|
+ begin
+ Link.create(tail_uuid: shared_uuid, link_class: "permission",
+ name: "can_read", head_uuid: @object.uuid)
+ rescue ArvadosApiClient::ApiError => error
+ results["failure"][shared_uuid] = error.api_response.andand[:errors]
+ else
+ results["success"] << shared_uuid
+ end
+ end
+ status = (results["failure"].empty?) ? 200 : 422
+ respond_to do |f|
+ f.json { render(json: results, status: status) }
+ end
+ end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list