Permalink
Browse files

Updates to the ACM

- permission set update
- db indexes added
- CFID-135: Added the license file and notice to the ACM code
- Updated vendor cache.
- Fixed remove_permission

Change-Id: Id8b9599de75ae89ffd5f12609b184bbe5cd601a7
  • Loading branch information...
1 parent 2588ce4 commit de587f409d23ccee58f476856b11a1a310c8c06f @joeldsa joeldsa committed Feb 22, 2012
Showing with 13,408 additions and 13 deletions.
  1. +1 −0 .gitignore
  2. +2 −2 Gemfile.lock
  3. +12,737 −0 LICENSE.TXT
  4. +11 −0 Rakefile
  5. +11 −0 bin/acm
  6. +23 −2 db/migrations/001_initial.rb
  7. +11 −0 lib/acm/api_controller.rb
  8. +11 −0 lib/acm/config.rb
  9. +11 −0 lib/acm/errors.rb
  10. +11 −0 lib/acm/models/access_control_entries.rb
  11. +11 −0 lib/acm/models/acm_common_model.rb
  12. +11 −0 lib/acm/models/members.rb
  13. +11 −0 lib/acm/models/object_permission_set_map.rb
  14. +11 −0 lib/acm/models/objects.rb
  15. +11 −0 lib/acm/models/permission_sets.rb
  16. +11 −0 lib/acm/models/permissions.rb
  17. +11 −0 lib/acm/models/subjects.rb
  18. +11 −0 lib/acm/rack_monkey_patch.rb
  19. +11 −0 lib/acm/routes/access_controller.rb
  20. +11 −0 lib/acm/routes/group_controller.rb
  21. +11 −0 lib/acm/routes/object_controller.rb
  22. +11 −0 lib/acm/routes/permission_set_controller.rb
  23. +11 −0 lib/acm/routes/user_controller.rb
  24. +11 −0 lib/acm/services/access_control_service.rb
  25. +16 −1 lib/acm/services/acm_service.rb
  26. +11 −0 lib/acm/services/group_service.rb
  27. +89 −4 lib/acm/services/object_service.rb
  28. +76 −3 lib/acm/services/permission_set_service.rb
  29. +11 −0 lib/acm/services/user_service.rb
  30. +11 −0 lib/acm/thread_formatter.rb
  31. +11 −0 lib/acm/utils.rb
  32. +11 −0 lib/acm_controller.rb
  33. +11 −0 spec/Rakefile
  34. +11 −0 spec/functional/access_controller_spec.rb
  35. +11 −0 spec/functional/auth_controller_spec.rb
  36. +11 −0 spec/functional/group_controller_spec.rb
  37. +48 −0 spec/functional/object_controller_spec.rb
  38. +11 −0 spec/functional/permission_set_controller_spec.rb
  39. +11 −0 spec/functional/user_controller_spec.rb
  40. +11 −0 spec/spec_helper.rb
  41. +11 −0 spec/unit/group_service_spec.rb
  42. +11 −1 spec/unit/object_service_spec.rb
  43. +31 −0 spec/unit/permission_set_service_spec.rb
  44. +11 −0 spec/unit/user_service_spec.rb
  45. BIN vendor/cache/ci_reporter-1.6.5.gem
  46. BIN vendor/cache/ci_reporter-1.7.0.gem
  47. BIN vendor/cache/sequel-3.31.0.gem
  48. BIN vendor/cache/sequel-3.32.0.gem
View
@@ -1,2 +1,3 @@
.idea/*
cov/
+*.sw*
View
@@ -3,7 +3,7 @@ GEM
specs:
SystemTimer (1.2.3)
builder (3.0.0)
- ci_reporter (1.6.5)
+ ci_reporter (1.7.0)
builder (>= 2.1.2)
daemons (1.1.6)
diff-lcs (1.1.3)
@@ -24,7 +24,7 @@ GEM
rspec-expectations (2.8.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.8.0)
- sequel (3.31.0)
+ sequel (3.32.0)
simplecov (0.5.4)
multi_json (~> 1.0.3)
simplecov-html (~> 0.5.3)
View
12,737 LICENSE.TXT

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,3 +1,14 @@
+# Cloud Foundry 2012.02.03 Beta
+# Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
+#
+# This product is licensed to you under the Apache License, Version 2.0 (the "License").
+# You may not use this product except in compliance with the License.
+#
+# This product includes a number of subcomponents with
+# separate copyright notices and license terms. Your use of these
+# subcomponents is subject to the terms and conditions of the
+# subcomponent's license, as noted in the LICENSE file.
+
require 'rake'
desc "Run specs"
View
11 bin/acm
@@ -1,3 +1,14 @@
+# Cloud Foundry 2012.02.03 Beta
+# Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
+#
+# This product is licensed to you under the Apache License, Version 2.0 (the "License").
+# You may not use this product except in compliance with the License.
+#
+# This product includes a number of subcomponents with
+# separate copyright notices and license terms. Your use of these
+# subcomponents is subject to the terms and conditions of the
+# subcomponent's license, as noted in the LICENSE file.
+
#!/usr/bin/env ruby
#
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
@@ -1,3 +1,14 @@
+# Cloud Foundry 2012.02.03 Beta
+# Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
+#
+# This product is licensed to you under the Apache License, Version 2.0 (the "License").
+# You may not use this product except in compliance with the License.
+#
+# This product includes a number of subcomponents with
+# separate copyright notices and license terms. Your use of these
+# subcomponents is subject to the terms and conditions of the
+# subcomponent's license, as noted in the LICENSE file.
+
Sequel.migration do
up do
create_table :objects do
@@ -9,6 +20,8 @@
time :created_at, :null => false
time :last_updated_at, :null => false
+ index [:immutable_id], :unique => true
+
end
create_table :permission_sets do
@@ -25,6 +38,7 @@
primary_key :id
foreign_key :object_id, :objects
foreign_key :permission_set_id, :permission_sets
+
end
create_table :permissions do
@@ -46,7 +60,10 @@
time :created_at, :null => false
time :last_updated_at, :null => false
- unique [:object_id, :permission_id, :subject_id]
+ index [:object_id, :permission_id, :subject_id], :unique => true
+ index [:object_id, :permission_id]
+ index [:object_id]
+ index [:subject_id]
end
create_table :subjects do
@@ -58,6 +75,9 @@
time :created_at, :null => false
time :last_updated_at, :null => false
+
+ index [:immutable_id, :type]
+ index [:immutable_id], :unique => true
end
create_table :members do
@@ -68,7 +88,8 @@
time :created_at, :null => false
time :last_updated_at, :null => false
- unique [:group_id, :user_id]
+ index [:group_id, :user_id], :unique => true
+ index [:group_id]
end
end
View
@@ -1,3 +1,14 @@
+# Cloud Foundry 2012.02.03 Beta
+# Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
+#
+# This product is licensed to you under the Apache License, Version 2.0 (the "License").
+# You may not use this product except in compliance with the License.
+#
+# This product includes a number of subcomponents with
+# separate copyright notices and license terms. Your use of these
+# subcomponents is subject to the terms and conditions of the
+# subcomponent's license, as noted in the LICENSE file.
+
require 'acm/errors'
require 'acm_controller'
require 'acm/routes/object_controller'
View
@@ -1,3 +1,14 @@
+# Cloud Foundry 2012.02.03 Beta
+# Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
+#
+# This product is licensed to you under the Apache License, Version 2.0 (the "License").
+# You may not use this product except in compliance with the License.
+#
+# This product includes a number of subcomponents with
+# separate copyright notices and license terms. Your use of these
+# subcomponents is subject to the terms and conditions of the
+# subcomponent's license, as noted in the LICENSE file.
+
require "logger"
require "securerandom"
require "sequel"
View
@@ -1,3 +1,14 @@
+# Cloud Foundry 2012.02.03 Beta
+# Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
+#
+# This product is licensed to you under the Apache License, Version 2.0 (the "License").
+# You may not use this product except in compliance with the License.
+#
+# This product includes a number of subcomponents with
+# separate copyright notices and license terms. Your use of these
+# subcomponents is subject to the terms and conditions of the
+# subcomponent's license, as noted in the LICENSE file.
+
# Default error classes for the ACM
module ACM
@@ -1,3 +1,14 @@
+# Cloud Foundry 2012.02.03 Beta
+# Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
+#
+# This product is licensed to you under the Apache License, Version 2.0 (the "License").
+# You may not use this product except in compliance with the License.
+#
+# This product includes a number of subcomponents with
+# separate copyright notices and license terms. Your use of these
+# subcomponents is subject to the terms and conditions of the
+# subcomponent's license, as noted in the LICENSE file.
+
require 'sequel'
require 'acm/models/acm_common_model'
@@ -1,3 +1,14 @@
+# Cloud Foundry 2012.02.03 Beta
+# Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
+#
+# This product is licensed to you under the Apache License, Version 2.0 (the "License").
+# You may not use this product except in compliance with the License.
+#
+# This product includes a number of subcomponents with
+# separate copyright notices and license terms. Your use of these
+# subcomponents is subject to the terms and conditions of the
+# subcomponent's license, as noted in the LICENSE file.
+
module ACM::Models
module Common
View
@@ -1,3 +1,14 @@
+# Cloud Foundry 2012.02.03 Beta
+# Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
+#
+# This product is licensed to you under the Apache License, Version 2.0 (the "License").
+# You may not use this product except in compliance with the License.
+#
+# This product includes a number of subcomponents with
+# separate copyright notices and license terms. Your use of these
+# subcomponents is subject to the terms and conditions of the
+# subcomponent's license, as noted in the LICENSE file.
+
require 'acm/models/acm_common_model'
require 'sequel'
@@ -1,3 +1,14 @@
+# Cloud Foundry 2012.02.03 Beta
+# Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
+#
+# This product is licensed to you under the Apache License, Version 2.0 (the "License").
+# You may not use this product except in compliance with the License.
+#
+# This product includes a number of subcomponents with
+# separate copyright notices and license terms. Your use of these
+# subcomponents is subject to the terms and conditions of the
+# subcomponent's license, as noted in the LICENSE file.
+
require 'sequel'
module ACM::Models
View
@@ -1,3 +1,14 @@
+# Cloud Foundry 2012.02.03 Beta
+# Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
+#
+# This product is licensed to you under the Apache License, Version 2.0 (the "License").
+# You may not use this product except in compliance with the License.
+#
+# This product includes a number of subcomponents with
+# separate copyright notices and license terms. Your use of these
+# subcomponents is subject to the terms and conditions of the
+# subcomponent's license, as noted in the LICENSE file.
+
require 'acm/models/acm_common_model'
require 'acm/models/permission_sets'
require 'acm/models/access_control_entries'
@@ -1,3 +1,14 @@
+# Cloud Foundry 2012.02.03 Beta
+# Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
+#
+# This product is licensed to you under the Apache License, Version 2.0 (the "License").
+# You may not use this product except in compliance with the License.
+#
+# This product includes a number of subcomponents with
+# separate copyright notices and license terms. Your use of these
+# subcomponents is subject to the terms and conditions of the
+# subcomponent's license, as noted in the LICENSE file.
+
require 'acm/models/acm_common_model'
require 'sequel'
require 'json'
@@ -1,3 +1,14 @@
+# Cloud Foundry 2012.02.03 Beta
+# Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
+#
+# This product is licensed to you under the Apache License, Version 2.0 (the "License").
+# You may not use this product except in compliance with the License.
+#
+# This product includes a number of subcomponents with
+# separate copyright notices and license terms. Your use of these
+# subcomponents is subject to the terms and conditions of the
+# subcomponent's license, as noted in the LICENSE file.
+
require 'acm/models/acm_common_model'
require 'sequel'
View
@@ -1,3 +1,14 @@
+# Cloud Foundry 2012.02.03 Beta
+# Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
+#
+# This product is licensed to you under the Apache License, Version 2.0 (the "License").
+# You may not use this product except in compliance with the License.
+#
+# This product includes a number of subcomponents with
+# separate copyright notices and license terms. Your use of these
+# subcomponents is subject to the terms and conditions of the
+# subcomponent's license, as noted in the LICENSE file.
+
require 'acm/models/acm_common_model'
require 'sequel'
require 'json'
@@ -1,3 +1,14 @@
+# Cloud Foundry 2012.02.03 Beta
+# Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
+#
+# This product is licensed to you under the Apache License, Version 2.0 (the "License").
+# You may not use this product except in compliance with the License.
+#
+# This product includes a number of subcomponents with
+# separate copyright notices and license terms. Your use of these
+# subcomponents is subject to the terms and conditions of the
+# subcomponent's license, as noted in the LICENSE file.
+
# For an explanation, see http://xampl.com/so/2009/12/16/rubyrack-and-multiple-value-request-param-pain-—-part-one/
require 'rack'
@@ -1,3 +1,14 @@
+# Cloud Foundry 2012.02.03 Beta
+# Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
+#
+# This product is licensed to you under the Apache License, Version 2.0 (the "License").
+# You may not use this product except in compliance with the License.
+#
+# This product includes a number of subcomponents with
+# separate copyright notices and license terms. Your use of these
+# subcomponents is subject to the terms and conditions of the
+# subcomponent's license, as noted in the LICENSE file.
+
require 'sinatra/base'
module ACM::Controller
@@ -1,3 +1,14 @@
+# Cloud Foundry 2012.02.03 Beta
+# Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
+#
+# This product is licensed to you under the Apache License, Version 2.0 (the "License").
+# You may not use this product except in compliance with the License.
+#
+# This product includes a number of subcomponents with
+# separate copyright notices and license terms. Your use of these
+# subcomponents is subject to the terms and conditions of the
+# subcomponent's license, as noted in the LICENSE file.
+
require 'sinatra/base'
module ACM::Controller
@@ -1,3 +1,14 @@
+# Cloud Foundry 2012.02.03 Beta
+# Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
+#
+# This product is licensed to you under the Apache License, Version 2.0 (the "License").
+# You may not use this product except in compliance with the License.
+#
+# This product includes a number of subcomponents with
+# separate copyright notices and license terms. Your use of these
+# subcomponents is subject to the terms and conditions of the
+# subcomponent's license, as noted in the LICENSE file.
+
require 'sinatra/base'
require 'json'
@@ -1,3 +1,14 @@
+# Cloud Foundry 2012.02.03 Beta
+# Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
+#
+# This product is licensed to you under the Apache License, Version 2.0 (the "License").
+# You may not use this product except in compliance with the License.
+#
+# This product includes a number of subcomponents with
+# separate copyright notices and license terms. Your use of these
+# subcomponents is subject to the terms and conditions of the
+# subcomponent's license, as noted in the LICENSE file.
+
require 'sinatra/base'
module ACM::Controller
@@ -1,3 +1,14 @@
+# Cloud Foundry 2012.02.03 Beta
+# Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
+#
+# This product is licensed to you under the Apache License, Version 2.0 (the "License").
+# You may not use this product except in compliance with the License.
+#
+# This product includes a number of subcomponents with
+# separate copyright notices and license terms. Your use of these
+# subcomponents is subject to the terms and conditions of the
+# subcomponent's license, as noted in the LICENSE file.
+
require 'sinatra/base'
module ACM::Controller
@@ -1,3 +1,14 @@
+# Cloud Foundry 2012.02.03 Beta
+# Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
+#
+# This product is licensed to you under the Apache License, Version 2.0 (the "License").
+# You may not use this product except in compliance with the License.
+#
+# This product includes a number of subcomponents with
+# separate copyright notices and license terms. Your use of these
+# subcomponents is subject to the terms and conditions of the
+# subcomponent's license, as noted in the LICENSE file.
+
require 'acm/services/acm_service'
require 'acm/models/subjects'
require 'acm/models/members'
Oops, something went wrong.

0 comments on commit de587f4

Please sign in to comment.