maestrano-rails 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/Gemfile.lock +86 -64
  4. data/app/controllers/maestrano/rails/saml_base_controller.rb +0 -2
  5. data/lib/generators/active_record/maestrano_group_generator.rb +1 -0
  6. data/lib/generators/active_record/maestrano_user_generator.rb +1 -0
  7. data/lib/generators/maestrano/initializer_generator.rb +12 -0
  8. data/lib/generators/maestrano/install_generator.rb +8 -6
  9. data/lib/generators/maestrano/orm_helpers.rb +2 -2
  10. data/lib/generators/maestrano/templates/group_users_controller.rb +4 -3
  11. data/lib/generators/maestrano/templates/groups_controller.rb +3 -2
  12. data/lib/generators/maestrano/templates/maestrano.rb +9 -4
  13. data/lib/generators/maestrano/templates/saml_controller.rb +6 -1
  14. data/lib/generators/mongoid/maestrano_group_generator.rb +1 -0
  15. data/lib/generators/mongoid/maestrano_user_generator.rb +1 -0
  16. data/lib/maestrano/rails/models/maestrano_auth_resource.rb +13 -10
  17. data/lib/maestrano/rails/routing/routes.rb +27 -8
  18. data/maestrano-rails.gemspec +9 -8
  19. data/test/dummy/db/test.sqlite3 +0 -0
  20. data/test/dummy_activerecord/app/models/mno_crew.rb +1 -1
  21. data/test/dummy_activerecord/app/models/mno_monster.rb +1 -1
  22. data/test/dummy_activerecord/db/migrate/20140526144828_create_mno_monsters.rb +1 -0
  23. data/test/dummy_activerecord/db/migrate/20140526151139_create_mno_crews.rb +1 -0
  24. data/test/dummy_activerecord/db/schema.rb +16 -14
  25. data/test/dummy_activerecord/db/test.sqlite3 +0 -0
  26. data/test/dummy_activerecord/log/test.log +12406 -1412
  27. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/{b0eaab2bc50e2e3547e318f8b43a941e → 070df203a09a9d4a368db8396165a105} +0 -0
  28. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  29. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/{776374354bf36d24e442115e63b9a735 → 2a43a943daba23e5e37e8edf97cb0bdb} +0 -0
  30. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  31. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  32. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/{cc70cce011a969eca12cb127583c2cd6 → 4d062bee73f43586c17d29a175f6243e} +0 -0
  33. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/58e369b37e5157ea746a485eea17e9f7 +0 -0
  34. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/7ae10239eda2588a95fdcc7d871bef52 +0 -0
  35. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/8d5d60255600aa010a32e1d1a9bc6db6 +0 -0
  36. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/b3d9b0e88cdded276ebdce333e338a85 +0 -0
  37. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  38. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  39. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/{9620fb848d554874d4f20b7f0d60f35d → e6e7b55d41c79514c44c3c8a45c17c60} +0 -0
  40. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  41. data/test/dummy_activerecord/tmp/cache/{assets/test/sprockets/v3.0/7Epn_PknptysV9qbt8psqZYuMkJ3cRQvbM5MRGmIoiM.cache → sprockets/v3.0/0sUVkLi2-TZrZ_FT_mDeGoWMwGpS48yEfEYxihy5nmI.cache} +0 -0
  42. data/test/dummy_activerecord/tmp/cache/{assets/test/sprockets/v3.0/s79F8WSoX84q4jW1ddfSi4dIy-lhWcJDPWw4asKPmMs.cache → sprockets/v3.0/2-0w2lrUYGJTWSS8ctq_qa38uSr88P2L-iV2bXyyGuA.cache} +0 -0
  43. data/test/dummy_activerecord/tmp/cache/{assets/test/sprockets/v3.0/DCFIDkbToSiICA4sBCKWvjY-H4gEV-F6c_uICFSEpyE.cache → sprockets/v3.0/38HqlC3fOtaqYgpSbnmBJox6dlNY7sjNBTzMNCFx4Mc.cache} +1 -1
  44. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/43SLVxa0HLJIPQPZDlXpd9_dnIUqeCXVwOA2A9V0Vsc.cache +0 -0
  45. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/5g7dhxVp4YbZmFw_-T3aU2oYq2Z9Jgtps0CKneXYSS0.cache +0 -0
  46. data/test/dummy_activerecord/tmp/cache/{assets/test/sprockets/v3.0/XGC8yjqErVk2OqXhCQ6xaSttX62JVKhceqwp6GNA57I.cache → sprockets/v3.0/7dUbHTwNQg5wkMpfSRWE_RDbzc7O3Kwh7s07ubAzXxY.cache} +1 -1
  47. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/9j4Cn3Bg7rj2--N8lWHQ-aSIKt0CZxl7GNjlSaHb7L0.cache +0 -0
  48. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/B5aB2pc11WJxcU-HyLFLnLC96fMFlug6Amz8hS7jDj0.cache +0 -0
  49. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/BQtyJR3ccqed7_s43p3BPj3IL18LWu1Fo1ZnzWC3qcc.cache +0 -0
  50. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/CLp73dIq-CQDXyYTsWbjSxI4NqvVR1Uci51S3Rt83yc.cache +1 -0
  51. data/test/dummy_activerecord/tmp/cache/{assets/test/sprockets/v3.0/mOquqR85EYU-k_BoZjuqfR9xrhR4yQUUWCi_3Y3f_u4.cache → sprockets/v3.0/F7q3Bp8Hvzh5mn9AJr9g9uo5GfbZkigepPO5ZXkTzGY.cache} +0 -0
  52. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/GBhwl-B9glhyk8ElvTWqe6I65UKde5wR9fVxPwwJ2Hg.cache +1 -0
  53. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/GDQMRgyhp21p2xg_ITm3PdEDJXU-mgllQ2Mij3aSig4.cache +1 -0
  54. data/test/dummy_activerecord/tmp/cache/{assets/test/sprockets/v3.0/Scwp43xGik78ndWSr7A_SyvfrES8ecFKFav7VJe3HFw.cache → sprockets/v3.0/HmDZuiDF0OtgSoq7e2rtPrN16sGrNzJO1GrvmJBFqYs.cache} +0 -0
  55. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/IXVtyHRBEhzVHqrNmcus7pvHXuNfpReCzYzxhB7bBPA.cache +0 -0
  56. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/IgIskv_-aTzPU_wM_Xr1bhk_nLAf8zYrjJonfNtAv6E.cache +1 -0
  57. data/test/dummy_activerecord/tmp/cache/{assets/test/sprockets/v3.0/SYzPyxJETf8U18Qget3u80KmztRl2iih2m4te76sQxs.cache → sprockets/v3.0/IrC3CI4UK9epEnLL0YUsgNBcThnYcTbaNjMC5uPv1Uo.cache} +0 -0
  58. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/K_kmfMGNdm_wfvEnsfYglN-C8fj94rbCQJSnAI03mNU.cache +1 -0
  59. data/test/dummy_activerecord/tmp/cache/{assets/test/sprockets/v3.0/UDEx_cN4FPO4_mm7ccGeHKEBLb_Mh1EwZpX4n8A-N6w.cache → sprockets/v3.0/KzZa0OWunZJvtU11r_4UKZgCItVQkohjptcFbJ570cU.cache} +0 -0
  60. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/LN4-PLL3b8DkfopaNEJ8U-nu9FuSHjEL4nELYoYCub8.cache +0 -0
  61. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/LniLozFK0AHveFRcKmFzbr_tFBteoecaWgVBQbJwaL0.cache +1 -0
  62. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/M0WOwkZpyk3ShmXHNFhdl4BgfEyvgZuzn40Fww00RYM.cache +1 -0
  63. data/test/dummy_activerecord/tmp/cache/{assets/test/sprockets/v3.0/W1I750hXtFauIXfdF_h8f0H6Eh9fPjn1nb3WDnJGJ_0.cache → sprockets/v3.0/M6sHCm5v32qRTBidHBsrTORDxaA9SCVgH3jnRn8iNLk.cache} +1 -1
  64. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/N6i2RwsdhSsA60KxpXlF7RYb3gLVu2mOQlWzPTMcNw4.cache +1 -0
  65. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/POVOiJI4HFOnKUqmwmHBWI-64koorns1IzsUwQdJwL0.cache +0 -0
  66. data/test/dummy_activerecord/tmp/cache/{assets/test/sprockets/v3.0/xNScSuE8jYRa2F41anynskx2xa5avSWkYLFAH2l95Ic.cache → sprockets/v3.0/TM6G95HBN6Kv_sF1SaADJyoSpQQSLmMnUXVn2f1jlnY.cache} +0 -0
  67. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/TsyULHo-Ep-IDDhu6nN9frFLJNe7hg_op-o6g3Ycp48.cache +0 -0
  68. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/VNCapNKJLeponthNeFJhaBYs92UBT3P8PugENHP0474.cache +0 -0
  69. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/W1I750hXtFauIXfdF_h8f0H6Eh9fPjn1nb3WDnJGJ_0.cache +0 -0
  70. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/WHb_lDwqFJu6BaJF8_AHwWMmgY9AIS0RUjJZATvHGy8.cache +0 -0
  71. data/test/dummy_activerecord/tmp/cache/{assets/test/sprockets/v3.0/SBwQFRWeGZwRAHnGVCZGOamm432tMyKa18m-p6TWU6Q.cache → sprockets/v3.0/WkKqqsOutgzMPu_Ym1AolTwC2_fRzqxbvRFpO9Lgh5s.cache} +0 -0
  72. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/Wo3dLIbJvLLO5QrL7Lxqf8CcxQPjTVgZjmAHci0eYlg.cache +1 -0
  73. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/aAuuIrhNOw2g3r2XWyh_9bURa6E2xn_5BCVi43ab-Ps.cache +0 -0
  74. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/aFlSrtCQNya8JILRa5652nUEY0ACPTd_pGU3yXuOx9o.cache +2 -0
  75. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/b7lBpkBxQaCxHBBRf-QF0CiQKnRE8kYGLUzgAPTjf_k.cache +0 -0
  76. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/c5Auc2IFYhhN0woGElqbdz3HoROtMJX4TmUNekopcik.cache +1 -0
  77. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/degszJUXEQsWvjrjcbxJNLqH6tFybiuIClFdPT8qgyE.cache +0 -0
  78. data/test/dummy_activerecord/tmp/cache/{assets/test/sprockets/v3.0/sn7tMYj6vUxaFXG7SQe4O79d5oMoqJydwx33q9-308E.cache → sprockets/v3.0/elwOvgAJ85O6bhimWI8AJJbAOJO-_oUSslLhr9GEfFc.cache} +0 -0
  79. data/test/dummy_activerecord/tmp/cache/{assets/test/sprockets/v3.0/7rKh4lG5ceEUlcKp6PKkbPdRZ-l2F_u-ZeykbRhaK2I.cache → sprockets/v3.0/f8WWrWAptfo1qSmHsTYrCJzb_vYG0wpQ9xvPvb0F6yI.cache} +0 -0
  80. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/hcPk5eM7VJPi2ZM7DxeJRgnl-LSUUd_GrYrFi2mj0Yc.cache +1 -0
  81. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/kw00uOxe2W3DagBUVa0aLGOXTAH8i5-PNNpxyDJXkR0.cache +1 -0
  82. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/l_tJ9WwBL9Q8XjxQN56nGuGtCrP7kGBvE8e76g8tRC0.cache +0 -0
  83. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/neudolVI7_nIBYKcEI1npz278d2-LSi4Y8fK5Z2ctTY.cache +1 -0
  84. data/test/dummy_activerecord/tmp/cache/{assets/test/sprockets/v3.0/EEUTqiyEo6nmDZZeHMwO1r9cKT3LhciUYFSoHU0iGcE.cache → sprockets/v3.0/qY82QbvY3JrynAsb6pAVt8teuBrKIkOQ4Yw25pqPvE0.cache} +0 -0
  85. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/qg_wftmO7jS_a89vOJgaK0THZaNR8KUscoQjo9oWPVU.cache +1 -0
  86. data/test/dummy_activerecord/tmp/cache/{assets/test/sprockets/v3.0/6aJwp38vBSXdtink_SgOtnqUqp8Z8okHEs08vGkZ0ec.cache → sprockets/v3.0/rjZFcBcZBcZzhVbfMwVzSmiPIhOG3lI-TPXRAVtpN6I.cache} +0 -0
  87. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/smkGipMoyg_yBW7rvwuP9Ci_fdWK1w68wbhDgjEjHcw.cache +0 -0
  88. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/smpyMrlMLm6NqLzR4-8kAty0B7CHGePCuc4KKNIU43Y.cache +1 -0
  89. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/spcLVj7sWjAbzSoM2eka7e_jHpvNnVKRzuuDwd0m-pQ.cache +1 -0
  90. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/uESU-1lgcxaDZ5lrTLLAlg8GUd-Igwr2gRavnaveWXU.cache +0 -0
  91. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/y66z-kCCKl0cyGdSI_hQzkRNjxRApQedRgJVTu3BuRo.cache +2 -0
  92. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/yJMqE54-t1my_dumhIg6mamMyRx0qADs7nY7cks0l-Q.cache +1 -0
  93. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/ypxuZOcRS1MWu4o3mfAWRIDDdEl4uWHuDdXkvQoohc4.cache +1 -0
  94. data/test/dummy_activerecord/tmp/cache/sprockets/v3.0/zcBfaDXG5wGN1mPgJL8V1Y7f3VJ7zCZzS4q4zY6CkEM.cache +1 -0
  95. data/test/models/maestrano_group_via_test.rb +2 -2
  96. data/test/models/maestrano_user_via_test.rb +2 -2
  97. data/test/tmp/app/controllers/maestrano/account/group_users_controller.rb +27 -0
  98. data/test/tmp/app/controllers/maestrano/account/groups_controller.rb +37 -0
  99. data/test/tmp/app/controllers/maestrano/auth/saml_controller.rb +57 -0
  100. data/test/tmp/config/routes.rb +60 -0
  101. metadata +130 -86
  102. data/test/dummy/db/development.sqlite3 +0 -0
  103. data/test/dummy_activerecord/db/development.sqlite3 +0 -0
  104. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/v3.0/-uA6cy-2nKd6XkeWcJhr8X3v3yZ5oViPiHRlvne99W0.cache +0 -2
  105. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/v3.0/04Ki0BXgfOJJaUw5um_GT67jyhfSeC5XuP72cI6NoDY.cache +0 -0
  106. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/v3.0/1ld51qTCgZXC9suf2t2hWCTtpjSIsBirvsb90m9ie-8.cache +0 -1
  107. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/v3.0/5g7dhxVp4YbZmFw_-T3aU2oYq2Z9Jgtps0CKneXYSS0.cache +0 -2
  108. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/v3.0/6RdLjaglysmf-CPvVKaloO_-5q9ADlCh9heL_jAQz-8.cache +0 -1
  109. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/v3.0/9TpslyozRKK68-sW9jLt13QIu1XWy-q-CzKU1EAb7RA.cache +0 -0
  110. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/v3.0/BQtyJR3ccqed7_s43p3BPj3IL18LWu1Fo1ZnzWC3qcc.cache +0 -2
  111. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/v3.0/KprhKxGjJIBw-qHcuN-fbQgVttWYDjUyQCKFvLUpSeQ.cache +0 -1
  112. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/v3.0/Mbf0YromzGbDh3Q33bjwLGOTV9oj3u4de0ocFPBeXCY.cache +0 -1
  113. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/v3.0/VNCapNKJLeponthNeFJhaBYs92UBT3P8PugENHP0474.cache +0 -2
  114. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/v3.0/WivRTRHrfoezUj_7OaU50eG012NUWibGEeJYA4g59mY.cache +0 -1
  115. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/v3.0/b7lBpkBxQaCxHBBRf-QF0CiQKnRE8kYGLUzgAPTjf_k.cache +0 -2
  116. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/v3.0/eYr8LE29pvbLeoiuX1INZlTcPYWjQ7ThMYuRIvPPlCg.cache +0 -1
  117. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/v3.0/gy9RGhwK8c2SEljBLCz_qiWrBoP_Cl5IgvCjJuxw148.cache +0 -0
  118. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/v3.0/l_tJ9WwBL9Q8XjxQN56nGuGtCrP7kGBvE8e76g8tRC0.cache +0 -2
  119. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/v3.0/mhIfYcBPFAF-_yuaqLVntwdB3zZcDDOc5femwATDC8Q.cache +0 -1
  120. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/v3.0/rXBgGAYahPKy55mgXjkz5OcFFiiGfvCLoOsbkMQGNDs.cache +0 -1
  121. data/test/dummy_activerecord/tmp/cache/assets/test/sprockets/v3.0/uRsN6Sa_S5hSLGCCuuLNBXfhwvck-N7Sr2XbVq8waFY.cache +0 -1
  122. data/test/tmp/app/models/monster.rb +0 -17
@@ -1,2 +1,2 @@
1
1
  [o:Set:
2
- @hash{ I"environment-version:ETTI"environment-paths;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"sfile-digest:///home/bruno/.rvm/gems/ruby-2.2.0/gems/jquery-rails-4.0.5/vendor/assets/javascripts/jquery_ujs.js;TT
2
+ @hash{ I"environment-version:ETTI"environment-paths;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"sfile-digest:///home/bruno/.rvm/gems/ruby-2.2.1/gems/jquery-rails-3.1.1/vendor/assets/javascripts/jquery_ujs.js;TT
@@ -1,2 +1,2 @@
1
1
  [o:Set:
2
- @hash{ I"environment-version:ETTI"environment-paths;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"ofile-digest:///home/bruno/.rvm/gems/ruby-2.2.0/gems/jquery-rails-4.0.5/vendor/assets/javascripts/jquery.js;TT
2
+ @hash{ I"environment-version:ETTI"environment-paths;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"ofile-digest:///home/bruno/.rvm/gems/ruby-2.2.1/gems/jquery-rails-3.1.1/vendor/assets/javascripts/jquery.js;TT
@@ -0,0 +1 @@
1
+ I"�app/assets/javascripts/application.js?type=application/javascript&id=0d07c1c0ebc480d08ca9fd1958036d5037d2b50761a811ca085bbd73c3976336:ET
@@ -0,0 +1 @@
1
+ "%��)��~&�mP�C?��EF@ �'���|k��
@@ -0,0 +1 @@
1
+ I"�/home/bruno/.rvm/gems/ruby-2.2.1/gems/jquery-rails-4.1.0/vendor/assets/javascripts/jquery.js?type=application/javascript&pipeline=self&id=28d0ffb8e94f2139ffe500090a66102550dbf9e4d8413d3d5f3b8984122e73fe:ET
@@ -0,0 +1 @@
1
+ I"�app/assets/javascripts/pages.js?type=application/javascript&pipeline=self&id=f21a8bd7e0b2a6ab84aac71ccceabb2ba5911329e5b1c69b1d95957db6025971:ET
@@ -0,0 +1 @@
1
+ I"}app/assets/stylesheets/application.css?type=text/css&id=1ab6620f87c6997d2f89daee17a0164c32ffaab01d3c002fcd8aea03c4b60a13:ET
@@ -0,0 +1 @@
1
+ "%�U7��r��� ����ڥ�2�)d*�d��/po�
@@ -0,0 +1 @@
1
+ I"�app/assets/stylesheets/application.css?type=text/css&pipeline=self&id=5a82b008a9614b661639dbecf808d1f712fc469ba2e9f70fa2781aab53faf94b:ET
@@ -1,2 +1,2 @@
1
1
  [o:Set:
2
- @hash{ I"environment-version:ETTI"environment-paths;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"2file-digest://app/assets/javascripts/pages.js;TT
2
+ @hash{ I"environment-version:ETTI"environment-paths;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"ofile-digest:///home/bruno/.rvm/gems/ruby-2.2.1/gems/jquery-rails-4.1.0/vendor/assets/javascripts/jquery.js;TT
@@ -0,0 +1 @@
1
+ I"�app/assets/stylesheets/application.css?type=text/css&pipeline=self&id=01b9f07f1ea6ab1ad1acaf3ae273ef102f47c07283f07c61b57fbd7d9d1c0451:ET
@@ -0,0 +1 @@
1
+ I"�app/assets/javascripts/application.js?type=application/javascript&id=69b4f28f43576ad32e7df804403a72dfb9c29bd8df946b59208af06ab3cc770f:ET
@@ -0,0 +1,2 @@
1
+ "%�=h�C-�\h?u�A��)zڭa�!o
2
+ �ЋI
@@ -0,0 +1 @@
1
+ I"}app/assets/stylesheets/application.css?type=text/css&id=dce8ef04b369ec971af191eeab3d5ae99b83138cd46053aa61523a76248797d1:ET
@@ -0,0 +1 @@
1
+ I"�/home/bruno/.rvm/gems/ruby-2.2.1/gems/jquery-rails-4.1.0/vendor/assets/javascripts/jquery_ujs.js?type=application/javascript&pipeline=self&id=f29eb803616a013f7efe7b152742a3120421f48d14deaed2f8db5c158663262b:ET
@@ -0,0 +1 @@
1
+ I"�/home/bruno/.rvm/gems/ruby-2.2.1/gems/jquery-rails-3.1.1/vendor/assets/javascripts/jquery.js?type=application/javascript&pipeline=self&id=53ad49b39d966c7de61842db6d0ccba6c280aaa008aec93cf8f29c945e8ba7da:ET
@@ -0,0 +1 @@
1
+ I"�/home/bruno/.rvm/gems/ruby-2.2.1/gems/jquery-rails-3.1.1/vendor/assets/javascripts/jquery_ujs.js?type=application/javascript&pipeline=self&id=f73a377b85acf41674c271351a19a9ad3130aa7b289152fd427ebd9cecc21446:ET
@@ -0,0 +1 @@
1
+ I"�app/assets/javascripts/application.js?type=application/javascript&pipeline=self&id=7cdeeae7d001c77779df3cea157481d4481b8660704119a29b89dd6a45944c85:ET
@@ -0,0 +1 @@
1
+ I"�app/assets/javascripts/pages.js?type=application/javascript&pipeline=self&id=8684badc0ff49e8476a25918bfe682f6664b4f656eeb4c497b923cc0604e457a:ET
@@ -0,0 +1 @@
1
+ "%���h��;����*���b(��n��Gn��L
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash{ I"environment-version:ETTI"environment-paths;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"sfile-digest:///home/bruno/.rvm/gems/ruby-2.2.1/gems/jquery-rails-4.1.0/vendor/assets/javascripts/jquery_ujs.js;TT
@@ -0,0 +1 @@
1
+ I"�app/assets/stylesheets/pages.css?type=text/css&pipeline=self&id=1f4c61808774a4edfb5283514dae20e34c959807edb6b8819ddd38f402562a51:ET
@@ -0,0 +1 @@
1
+ I"�app/assets/stylesheets/pages.css?type=text/css&pipeline=self&id=29fba2d97ea0da9cf8efb3a1519b753c361b591290b9ed973e84b8b2cb498a6b:ET
@@ -0,0 +1 @@
1
+ I"�app/assets/javascripts/application.js?type=application/javascript&pipeline=self&id=8f7206dbdc8a321d9b64c58507304a071e0ae944b05674ddac4f1e3fd9fc331b:ET
@@ -12,12 +12,12 @@ class MaestranoGroupViaTest < ActiveSupport::TestCase
12
12
 
13
13
  context "find_or_create_for_maestrano class method" do
14
14
  should "return the MnoCrew if it exists" do
15
- m = MnoCrew.create(name: "SomeCrew",provider: 'maestrano', uid: 'cld-1')
15
+ m = MnoCrew.create(name: "SomeCrew",provider: 'maestrano', uid: 'cld-1', tenant: 'default')
16
16
  assert_equal m, MnoCrew.find_or_create_for_maestrano({provider: 'maestrano', uid: 'cld-1'})
17
17
  end
18
18
 
19
19
  should "not return a MnoCrew from another provider if it exists" do
20
- m = MnoCrew.create(name: "SomeOtherCrew", provider: 'someoneelse', uid: 'usr-1')
20
+ m = MnoCrew.create(name: "SomeOtherCrew", provider: 'someoneelse', uid: 'usr-1', tenant: 'default')
21
21
  assert_not_equal m, MnoCrew.find_or_create_for_maestrano({provider: 'maestrano', uid: 'cld-1'})
22
22
  end
23
23
 
@@ -12,12 +12,12 @@ class MaestranoUserViaTest < ActiveSupport::TestCase
12
12
 
13
13
  context "find_or_create_for_maestrano class method" do
14
14
  should "return the MnoMonster if it exists" do
15
- m = MnoMonster.create(first_name: "John", last_name: "Jack", email: "monster@co.com", provider: 'maestrano', uid: 'usr-1')
15
+ m = MnoMonster.create(first_name: "John", last_name: "Jack", email: "monster@co.com", provider: 'maestrano', uid: 'usr-1', tenant: 'default')
16
16
  assert_equal m, MnoMonster.find_or_create_for_maestrano({provider: 'maestrano', uid: 'usr-1'})
17
17
  end
18
18
 
19
19
  should "not return a MnoMonster from another provider if it exists" do
20
- m = MnoMonster.create(first_name: "John", last_name: "Jack", email: "monster@co.com", provider: 'someoneelse', uid: 'usr-1')
20
+ m = MnoMonster.create(first_name: "John", last_name: "Jack", email: "monster@co.com", provider: 'someoneelse', uid: 'usr-1', tenant: 'default')
21
21
  assert_not_equal m, MnoMonster.find_or_create_for_maestrano({provider: 'maestrano', uid: 'usr-1'})
22
22
  end
23
23
 
@@ -0,0 +1,27 @@
1
+ class Maestrano::Account::GroupUsersController < Maestrano::Rails::WebHookController
2
+
3
+ # DELETE /maestrano/account/groups/cld-1/users/usr-1/:tenant
4
+ # Remove a user from a group
5
+ def destroy
6
+ # Set the right uid based on Maestrano.param('sso.creation_mode')
7
+ user_uid = Maestrano.mask_user(params[:id],params[:group_id])
8
+ group_uid = params[:group_id]
9
+ tenant = params[:tenant]
10
+
11
+ # Perform association deletion steps here
12
+ # --
13
+ # If Maestrano.param('sso.creation_mode') is set to virtual
14
+ # then you might want to just delete/cancel/block the user
15
+ #
16
+ # E.g
17
+ # user = User.find_by_tenant_and_uid(tenant, user_uid)
18
+ # organization = Organization.find_by_tenant_and_uid(tenant ,group_uid)
19
+ #
20
+ # if Maestrano.param('sso.creation_mode') == 'virtual'
21
+ # user.destroy
22
+ # else
23
+ # organization.remove_user(user)
24
+ # user.block_access! if user.reload.organizations.empty?
25
+ # end
26
+ end
27
+ end
@@ -0,0 +1,37 @@
1
+ class Maestrano::Account::GroupsController < Maestrano::Rails::WebHookController
2
+
3
+ # DELETE /maestrano/account/groups/cld-1/:tenant
4
+ # Delete an entire group
5
+ def destroy
6
+ group_uid = params[:id]
7
+ tenant = params[:tenant]
8
+
9
+ # Perform deletion steps here
10
+ # --
11
+ # If you need to perform a final checkout
12
+ # then you can call Maestrano::Account::Bill.create({.. final checkout details ..})
13
+ # --
14
+ # If Maestrano.param('sso.creation_mode') is set to virtual
15
+ # then you might want to delete/cancel/block all users under
16
+ # that group
17
+ # --
18
+ # E.g:
19
+ # organization = Organization.find_by_tenant_and_uid(tenant, group_uid)
20
+ #
21
+ # amount_cents = organization.calculate_total_due_remaining
22
+ # Maestrano::Account::Bill.create({
23
+ # group_id: group_uid,
24
+ # price_cents: amount_cents,
25
+ # description: "Final Payout"
26
+ # })
27
+ #
28
+ # if Maestrano.param('sso.creation_mode') == 'virtual'
29
+ # organization.members.where(provider:'maestrano').each do |user|
30
+ # user.destroy
31
+ # end
32
+ #
33
+ # organization.destroy
34
+ # render json: {success: true}
35
+ #
36
+ end
37
+ end
@@ -0,0 +1,57 @@
1
+ class Maestrano::Auth::SamlController < Maestrano::Rails::SamlBaseController
2
+
3
+ #== POST '/maestrano/auth/saml/consume/:tenant'
4
+ # Final phase of the Single Sign-On handshake. Find or create
5
+ # the required resources (user and group) and sign the user
6
+ # in
7
+ #
8
+ # This action is left to you to customize based on your application
9
+ # requirements. Below is presented a potential way of writing
10
+ # the action.
11
+ #
12
+ # Assuming you have enabled maestrano on a user model
13
+ # called 'User' and a group model called 'Organization'
14
+ # the action could be written the following way
15
+ def consume
16
+ ### 1)Find or create the user and the group
17
+ ### --
18
+ ### The class method 'find_or_create_for_maestrano' is provided
19
+ ### by the maestrano-rails gem on the model you have maestrano-ized.
20
+ ### The method uses the mapping defined in the model 'maestrano_*_via'
21
+ ### block to create the resource if it does not exist
22
+ ### The 'user_auth_hash' and 'group_auth_hash' methods are provided
23
+ ### by the controller.
24
+ ### --
25
+ # user = User.find_or_create_for_maestrano(user_auth_hash)
26
+ # organization = Organization.find_or_create_for_maestrano(group_auth_hash)
27
+ #
28
+ # user.tenant = params[:tenant]
29
+ # user.save
30
+ # organization.tenant = params[:tenant]
31
+ # organization.save
32
+ #
33
+ #
34
+ ### 2) Add the user to the group if not already a member
35
+ ### --
36
+ ### The 'user_group_rel_hash' method is provided by the controller.
37
+ ### The role attribute provided by maestrano is one of the following:
38
+ ### 'Member', 'Power User', 'Admin', 'Super Admin'
39
+ ### The 'member_of?' and 'add_member' methods are not provided by
40
+ ### maestrano and are left to you to implement on your models
41
+ ### --
42
+ # unless user.member_of?(organization)
43
+ # organization.add_member(user,role: user_group_rel_hash[:role])
44
+ # end
45
+ #
46
+ #
47
+ ### Sign the user in and redirect to application root
48
+ ### --
49
+ ### The 'sign_in' method is not provided by maestrano but should already
50
+ ### be there if you are using an authentication framework like Devise
51
+ ### --
52
+ # sign_in(user)
53
+ # redirect_to root_path
54
+
55
+ raise NotImplemented.new("The consume action should be customized to fit your application needs")
56
+ end
57
+ end
@@ -0,0 +1,60 @@
1
+ Dummy::Application.routes.draw do
2
+ maestrano_routes
3
+
4
+ # The priority is based upon order of creation:
5
+ # first created -> highest priority.
6
+
7
+ # Sample of regular route:
8
+ # match 'products/:id' => 'catalog#view'
9
+ # Keep in mind you can assign values other than :controller and :action
10
+
11
+ # Sample of named route:
12
+ # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
13
+ # This route can be invoked with purchase_url(:id => product.id)
14
+
15
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
16
+ # resources :products
17
+
18
+ # Sample resource route with options:
19
+ # resources :products do
20
+ # member do
21
+ # get 'short'
22
+ # post 'toggle'
23
+ # end
24
+ #
25
+ # collection do
26
+ # get 'sold'
27
+ # end
28
+ # end
29
+
30
+ # Sample resource route with sub-resources:
31
+ # resources :products do
32
+ # resources :comments, :sales
33
+ # resource :seller
34
+ # end
35
+
36
+ # Sample resource route with more complex sub-resources
37
+ # resources :products do
38
+ # resources :comments
39
+ # resources :sales do
40
+ # get 'recent', :on => :collection
41
+ # end
42
+ # end
43
+
44
+ # Sample resource route within a namespace:
45
+ # namespace :admin do
46
+ # # Directs /admin/products/* to Admin::ProductsController
47
+ # # (app/controllers/admin/products_controller.rb)
48
+ # resources :products
49
+ # end
50
+
51
+ # You can have the root of your site routed with "root"
52
+ # just remember to delete public/index.html.
53
+ # root :to => 'welcome#index'
54
+
55
+ # See how all your routes lay out with "rake routes"
56
+
57
+ # This is a legacy wild controller route that's not recommended for RESTful applications.
58
+ # Note: This route will make all actions in every controller accessible via GET requests.
59
+ # match ':controller(/:action(/:id))(.:format)'
60
+ end