This repository has been archived on 2021-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
greenlight/spec/controllers/admins_controller_spec.rb

874 lines
31 KiB
Ruby
Raw Permalink Normal View History

Admin panel (#496) * Added the administrator role and functionality that comes with it (#403) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * Update user.rb * Update admins.js * GRN-15: Added the ability to change color and image from admin interface (#425) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Update user.rb * Update user.rb * Update routes.rb * Update admins_controller.rb * GRN-87:Added a super admin role and made changes to how to the design works (#430) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * Update user.rb * Update themes_controller_spec.rb * Update routes.rb * Update admins_controller.rb * Removed duplicated code that broke the build after last merge * GRN-78: Restructured some of the views to make the UI more consistent and responsive (#435) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * GRN-78: Cleaned up buttons and moved signin to its own page * GRN-78: Moved the Rooms and Recordings link to nav bar * Merge fix * Views restructure fix (#458) * Added cache to gitlab-ci.yml * Restructured seed * GRN2-99 -> GRN2-106: UI cleanup and refactoring (#478) * GRN2-98: Change Fullname to Full name * GRN2-105: Changed View Users to Manage Users * GRN2-101/103: Updated email to match branding * GRN2-100: Updated Email Sent flash to be more descriptive * GRN2-104: Redirect user to sign in page w/ flash after clicking activation link * GRN2-102: Changed the wording in the verification email * GRN2-99: Added email form validation * GRN2-106: Cleaned up Users list front end * Fixes to rake and admin password validator for passing rubocop * GRN2-113: Fixed issues with admin panel (#479) * GRN2-116: Code clean up after restructure of views (#482) * Removed unused references * Rubocop * Added pagination to admin view (#483) * GRN2-114: Added the ability for admins to ban/unban users (#487) * Added the ability for admins to ban and unban users * Update sessions_helper.rb * Merge branch 'master' into admin-panel (#492) * Updated rubocop gem * Updated rubocop and fixed issues (#490) * Rubocop fixes * GRN2-122: Updated sign in flow for admins and switch design tab to site settings (#489) * Switched design tab to site settings * Update _header with spaces instead of tabs * Added more test cases to increase coverage (#494)
2019-05-03 13:05:12 -04:00
# frozen_string_literal: true
# BigBlueButton open source conferencing system - http://www.bigbluebutton.org/.
#
# Copyright (c) 2018 BigBlueButton Inc. and by respective authors (see below).
#
# This program is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free Software
# Foundation; either version 3.0 of the License, or (at your option) any later
# version.
#
# BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License along
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
require "rails_helper"
describe AdminsController, type: :controller do
before do
2019-07-23 14:53:48 -04:00
allow_any_instance_of(ApplicationController).to receive(:set_user_domain).and_return("provider1")
controller.instance_variable_set(:@user_domain, "provider1")
Admin panel (#496) * Added the administrator role and functionality that comes with it (#403) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * Update user.rb * Update admins.js * GRN-15: Added the ability to change color and image from admin interface (#425) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Update user.rb * Update user.rb * Update routes.rb * Update admins_controller.rb * GRN-87:Added a super admin role and made changes to how to the design works (#430) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * Update user.rb * Update themes_controller_spec.rb * Update routes.rb * Update admins_controller.rb * Removed duplicated code that broke the build after last merge * GRN-78: Restructured some of the views to make the UI more consistent and responsive (#435) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * GRN-78: Cleaned up buttons and moved signin to its own page * GRN-78: Moved the Rooms and Recordings link to nav bar * Merge fix * Views restructure fix (#458) * Added cache to gitlab-ci.yml * Restructured seed * GRN2-99 -> GRN2-106: UI cleanup and refactoring (#478) * GRN2-98: Change Fullname to Full name * GRN2-105: Changed View Users to Manage Users * GRN2-101/103: Updated email to match branding * GRN2-100: Updated Email Sent flash to be more descriptive * GRN2-104: Redirect user to sign in page w/ flash after clicking activation link * GRN2-102: Changed the wording in the verification email * GRN2-99: Added email form validation * GRN2-106: Cleaned up Users list front end * Fixes to rake and admin password validator for passing rubocop * GRN2-113: Fixed issues with admin panel (#479) * GRN2-116: Code clean up after restructure of views (#482) * Removed unused references * Rubocop * Added pagination to admin view (#483) * GRN2-114: Added the ability for admins to ban/unban users (#487) * Added the ability for admins to ban and unban users * Update sessions_helper.rb * Merge branch 'master' into admin-panel (#492) * Updated rubocop gem * Updated rubocop and fixed issues (#490) * Rubocop fixes * GRN2-122: Updated sign in flow for admins and switch design tab to site settings (#489) * Switched design tab to site settings * Update _header with spaces instead of tabs * Added more test cases to increase coverage (#494)
2019-05-03 13:05:12 -04:00
@user = create(:user, provider: "provider1")
@admin = create(:user, provider: "provider1")
Merge v2.6-alpha (#1672) * GRN2-xx: Switch the relation between users and roles to make queries cleaner and faster (#1299) * First steps * Fixes in account creation flow * Fixed most testcases * more test fixes * Fixed more test cases * Passing tests and rubocop * Added rake task to remove rooms * Adding translation (#1510) * Update _account.html.erb * Update en.yml * Fix "for" attribute for label elements (#1488) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix some issues reported by LGTM (#1478) * Declare local JavaScript variables (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Remove unused local JavaScript variable (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Puma Worker Configuration (#1332) We noticed that the current default settings perform very poorly under load. We managed to literally take down Greenlight during a larger event when people where accessing the landing page for rooms and when doing some tests, I was more or less able to DoS Greenlight on my own. This patch adds a default worker configuration which significantly improves the situation. The small, 4 core machine I was testing on could handle about thrice the amount of requests. While the new default configuration should be reasonably well suited for most deployments, this patch further allows users to easily configure the worker pool on their own in the environment file. * Made name and email readonly for no greenlight accounts (#1534) * Fixed hardcoded string (#1532) * fixed spelling error that was bugging me :) - sep a rat e (#1535) Co-authored-by: Dave Lane <dave@oerfoundation.org> * Improve Server Rooms View (#1524) * Order rooms by status * Cleaned up order function * Now displays Started/Created/Ended * Added participant count to rooms list * Fix rake task user:create so that users can be created when terms are present (#1565) * Changed user create task to always accept terms * clean up * More secure room ID (#1451) * Legal and privpolicy link (#1421) * add customizable Links to Imprint and Privacy Policy * fix copy&paste error in spec * replace "imprint" with "legal" since that is the correct term * remove german translation of new strings, transifex will take care of them later * GRN2-295:Refactored update profile and update password (#1591) * Refactored update profile and update password * Relowered rubocop settings * Fixed email sending when not supposed to (#1592) * Design changes for small screens (#1580) * now rap for pagination * Update _subtitle.html.erb * Update _rooms.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update _users.html.erb * Update cant_create_rooms.html.erb * Update room.js * Update edit.html.erb * Update new.html.erb * Update cant_create_rooms.html.erb * Update _sessions.html.erb * Update _account.html.erb * Make Greenlight work with Ruby 2.7 (#1560) Greenlight's failure to start up with Ruby 2.7 seems to be caused by [an issue in bootsnap](https://github.com/Shopify/bootsnap/issues/258). Updating that library makes Greenlight work again. However, there are still a lot of deprecation warnings. But that's something to deal with separately. This fixes #1558 * use email input for sign in (#1199) * use email input for sign in * use email input for registration * use email input for invitation * use email input for account settings Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix Gemfile (#1593) * Fixed invalid token for password reset (#1632) * HELP_URL env variable now works as expected (#1636) * #1372 Fix for long Text in Table + Remove invalid HTML Tag (#1403) * removed invalid HTML Tag * removed invalid HTML Tag * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _server_recording_row.html.erb form-inline replaced by own css * Update _server_room_row.html.erb * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _public_recording_row.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update main.scss fix for long text * Update main.scss * Update _public_recording_row.html.erb * Added more validation on profile image (#1644) * Users who can't create rooms but have shared rooms now have a different view (#1649) * Revert "Puma Worker Configuration (#1332)" (#1667) This reverts commit 78ed8d74601b613af3fd96ccf75a6bada24deddd. * Removed html safe from all flash messages (#1668) * Remove hardcoded guest=true if require mod approval is set (#1669) * Change random generation for room uid (#1670) * GRN2-290: Update gems and update to Rails 5.2.4.3 (#1671) * Update gems and update to Rails 5.2.4.3 * remove gemfile error Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: Florian Weber <fnwbr@users.noreply.github.com> Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Lars Kiesow <lkiesow@uos.de> Co-authored-by: Dave Lane <dave@lane.net.nz> Co-authored-by: Dave Lane <dave@oerfoundation.org> Co-authored-by: Henning <hng@users.noreply.github.com> Co-authored-by: Marcel Waldvogel <marcel@waldvogel.family> Co-authored-by: Christian Marg <marg@rz.tu-clausthal.de> Co-authored-by: Klaus <klaus@jsxc.org>
2020-05-26 17:37:23 -04:00
@admin.set_role :admin
Admin panel (#496) * Added the administrator role and functionality that comes with it (#403) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * Update user.rb * Update admins.js * GRN-15: Added the ability to change color and image from admin interface (#425) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Update user.rb * Update user.rb * Update routes.rb * Update admins_controller.rb * GRN-87:Added a super admin role and made changes to how to the design works (#430) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * Update user.rb * Update themes_controller_spec.rb * Update routes.rb * Update admins_controller.rb * Removed duplicated code that broke the build after last merge * GRN-78: Restructured some of the views to make the UI more consistent and responsive (#435) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * GRN-78: Cleaned up buttons and moved signin to its own page * GRN-78: Moved the Rooms and Recordings link to nav bar * Merge fix * Views restructure fix (#458) * Added cache to gitlab-ci.yml * Restructured seed * GRN2-99 -> GRN2-106: UI cleanup and refactoring (#478) * GRN2-98: Change Fullname to Full name * GRN2-105: Changed View Users to Manage Users * GRN2-101/103: Updated email to match branding * GRN2-100: Updated Email Sent flash to be more descriptive * GRN2-104: Redirect user to sign in page w/ flash after clicking activation link * GRN2-102: Changed the wording in the verification email * GRN2-99: Added email form validation * GRN2-106: Cleaned up Users list front end * Fixes to rake and admin password validator for passing rubocop * GRN2-113: Fixed issues with admin panel (#479) * GRN2-116: Code clean up after restructure of views (#482) * Removed unused references * Rubocop * Added pagination to admin view (#483) * GRN2-114: Added the ability for admins to ban/unban users (#487) * Added the ability for admins to ban and unban users * Update sessions_helper.rb * Merge branch 'master' into admin-panel (#492) * Updated rubocop gem * Updated rubocop and fixed issues (#490) * Rubocop fixes * GRN2-122: Updated sign in flow for admins and switch design tab to site settings (#489) * Switched design tab to site settings * Update _header with spaces instead of tabs * Added more test cases to increase coverage (#494)
2019-05-03 13:05:12 -04:00
end
describe "Server Recordings" do
it "renders the server_recordings page" do
@request.session[:user_id] = @admin.id
get :server_recordings
expect(response).to render_template(:server_recordings)
end
end
describe "Server Rooms" do
it "renders the server_rooms page" do
@request.session[:user_id] = @admin.id
get :server_rooms
expect(response).to render_template(:server_rooms)
end
end
Admin panel (#496) * Added the administrator role and functionality that comes with it (#403) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * Update user.rb * Update admins.js * GRN-15: Added the ability to change color and image from admin interface (#425) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Update user.rb * Update user.rb * Update routes.rb * Update admins_controller.rb * GRN-87:Added a super admin role and made changes to how to the design works (#430) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * Update user.rb * Update themes_controller_spec.rb * Update routes.rb * Update admins_controller.rb * Removed duplicated code that broke the build after last merge * GRN-78: Restructured some of the views to make the UI more consistent and responsive (#435) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * GRN-78: Cleaned up buttons and moved signin to its own page * GRN-78: Moved the Rooms and Recordings link to nav bar * Merge fix * Views restructure fix (#458) * Added cache to gitlab-ci.yml * Restructured seed * GRN2-99 -> GRN2-106: UI cleanup and refactoring (#478) * GRN2-98: Change Fullname to Full name * GRN2-105: Changed View Users to Manage Users * GRN2-101/103: Updated email to match branding * GRN2-100: Updated Email Sent flash to be more descriptive * GRN2-104: Redirect user to sign in page w/ flash after clicking activation link * GRN2-102: Changed the wording in the verification email * GRN2-99: Added email form validation * GRN2-106: Cleaned up Users list front end * Fixes to rake and admin password validator for passing rubocop * GRN2-113: Fixed issues with admin panel (#479) * GRN2-116: Code clean up after restructure of views (#482) * Removed unused references * Rubocop * Added pagination to admin view (#483) * GRN2-114: Added the ability for admins to ban/unban users (#487) * Added the ability for admins to ban and unban users * Update sessions_helper.rb * Merge branch 'master' into admin-panel (#492) * Updated rubocop gem * Updated rubocop and fixed issues (#490) * Rubocop fixes * GRN2-122: Updated sign in flow for admins and switch design tab to site settings (#489) * Switched design tab to site settings * Update _header with spaces instead of tabs * Added more test cases to increase coverage (#494)
2019-05-03 13:05:12 -04:00
describe "User Roles" do
before do
allow(Rails.configuration).to receive(:enable_email_verification).and_return(true)
end
Admin panel (#496) * Added the administrator role and functionality that comes with it (#403) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * Update user.rb * Update admins.js * GRN-15: Added the ability to change color and image from admin interface (#425) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Update user.rb * Update user.rb * Update routes.rb * Update admins_controller.rb * GRN-87:Added a super admin role and made changes to how to the design works (#430) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * Update user.rb * Update themes_controller_spec.rb * Update routes.rb * Update admins_controller.rb * Removed duplicated code that broke the build after last merge * GRN-78: Restructured some of the views to make the UI more consistent and responsive (#435) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * GRN-78: Cleaned up buttons and moved signin to its own page * GRN-78: Moved the Rooms and Recordings link to nav bar * Merge fix * Views restructure fix (#458) * Added cache to gitlab-ci.yml * Restructured seed * GRN2-99 -> GRN2-106: UI cleanup and refactoring (#478) * GRN2-98: Change Fullname to Full name * GRN2-105: Changed View Users to Manage Users * GRN2-101/103: Updated email to match branding * GRN2-100: Updated Email Sent flash to be more descriptive * GRN2-104: Redirect user to sign in page w/ flash after clicking activation link * GRN2-102: Changed the wording in the verification email * GRN2-99: Added email form validation * GRN2-106: Cleaned up Users list front end * Fixes to rake and admin password validator for passing rubocop * GRN2-113: Fixed issues with admin panel (#479) * GRN2-116: Code clean up after restructure of views (#482) * Removed unused references * Rubocop * Added pagination to admin view (#483) * GRN2-114: Added the ability for admins to ban/unban users (#487) * Added the ability for admins to ban and unban users * Update sessions_helper.rb * Merge branch 'master' into admin-panel (#492) * Updated rubocop gem * Updated rubocop and fixed issues (#490) * Rubocop fixes * GRN2-122: Updated sign in flow for admins and switch design tab to site settings (#489) * Switched design tab to site settings * Update _header with spaces instead of tabs * Added more test cases to increase coverage (#494)
2019-05-03 13:05:12 -04:00
context "GET #index" do
it "renders a 404 if a user tries to acccess it" do
@request.session[:user_id] = @user.id
get :index
expect(response).to render_template(:greenlight_error)
Admin panel (#496) * Added the administrator role and functionality that comes with it (#403) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * Update user.rb * Update admins.js * GRN-15: Added the ability to change color and image from admin interface (#425) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Update user.rb * Update user.rb * Update routes.rb * Update admins_controller.rb * GRN-87:Added a super admin role and made changes to how to the design works (#430) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * Update user.rb * Update themes_controller_spec.rb * Update routes.rb * Update admins_controller.rb * Removed duplicated code that broke the build after last merge * GRN-78: Restructured some of the views to make the UI more consistent and responsive (#435) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * GRN-78: Cleaned up buttons and moved signin to its own page * GRN-78: Moved the Rooms and Recordings link to nav bar * Merge fix * Views restructure fix (#458) * Added cache to gitlab-ci.yml * Restructured seed * GRN2-99 -> GRN2-106: UI cleanup and refactoring (#478) * GRN2-98: Change Fullname to Full name * GRN2-105: Changed View Users to Manage Users * GRN2-101/103: Updated email to match branding * GRN2-100: Updated Email Sent flash to be more descriptive * GRN2-104: Redirect user to sign in page w/ flash after clicking activation link * GRN2-102: Changed the wording in the verification email * GRN2-99: Added email form validation * GRN2-106: Cleaned up Users list front end * Fixes to rake and admin password validator for passing rubocop * GRN2-113: Fixed issues with admin panel (#479) * GRN2-116: Code clean up after restructure of views (#482) * Removed unused references * Rubocop * Added pagination to admin view (#483) * GRN2-114: Added the ability for admins to ban/unban users (#487) * Added the ability for admins to ban and unban users * Update sessions_helper.rb * Merge branch 'master' into admin-panel (#492) * Updated rubocop gem * Updated rubocop and fixed issues (#490) * Rubocop fixes * GRN2-122: Updated sign in flow for admins and switch design tab to site settings (#489) * Switched design tab to site settings * Update _header with spaces instead of tabs * Added more test cases to increase coverage (#494)
2019-05-03 13:05:12 -04:00
end
it "renders the admin settings if an admin tries to acccess it" do
@request.session[:user_id] = @admin.id
get :index
expect(response).to render_template(:index)
end
end
context "GET #edit_user" do
it "renders the index page" do
@request.session[:user_id] = @admin.id
get :edit_user, params: { user_uid: @user.uid }
expect(response).to render_template(:edit_user)
Admin panel (#496) * Added the administrator role and functionality that comes with it (#403) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * Update user.rb * Update admins.js * GRN-15: Added the ability to change color and image from admin interface (#425) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Update user.rb * Update user.rb * Update routes.rb * Update admins_controller.rb * GRN-87:Added a super admin role and made changes to how to the design works (#430) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * Update user.rb * Update themes_controller_spec.rb * Update routes.rb * Update admins_controller.rb * Removed duplicated code that broke the build after last merge * GRN-78: Restructured some of the views to make the UI more consistent and responsive (#435) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * GRN-78: Cleaned up buttons and moved signin to its own page * GRN-78: Moved the Rooms and Recordings link to nav bar * Merge fix * Views restructure fix (#458) * Added cache to gitlab-ci.yml * Restructured seed * GRN2-99 -> GRN2-106: UI cleanup and refactoring (#478) * GRN2-98: Change Fullname to Full name * GRN2-105: Changed View Users to Manage Users * GRN2-101/103: Updated email to match branding * GRN2-100: Updated Email Sent flash to be more descriptive * GRN2-104: Redirect user to sign in page w/ flash after clicking activation link * GRN2-102: Changed the wording in the verification email * GRN2-99: Added email form validation * GRN2-106: Cleaned up Users list front end * Fixes to rake and admin password validator for passing rubocop * GRN2-113: Fixed issues with admin panel (#479) * GRN2-116: Code clean up after restructure of views (#482) * Removed unused references * Rubocop * Added pagination to admin view (#483) * GRN2-114: Added the ability for admins to ban/unban users (#487) * Added the ability for admins to ban and unban users * Update sessions_helper.rb * Merge branch 'master' into admin-panel (#492) * Updated rubocop gem * Updated rubocop and fixed issues (#490) * Rubocop fixes * GRN2-122: Updated sign in flow for admins and switch design tab to site settings (#489) * Switched design tab to site settings * Update _header with spaces instead of tabs * Added more test cases to increase coverage (#494)
2019-05-03 13:05:12 -04:00
end
end
context "POST #ban" do
it "bans a user from the application" do
@request.session[:user_id] = @admin.id
expect(@user.has_role?(:denied)).to eq(false)
post :ban_user, params: { user_uid: @user.uid }
@user.reload
Admin panel (#496) * Added the administrator role and functionality that comes with it (#403) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * Update user.rb * Update admins.js * GRN-15: Added the ability to change color and image from admin interface (#425) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Update user.rb * Update user.rb * Update routes.rb * Update admins_controller.rb * GRN-87:Added a super admin role and made changes to how to the design works (#430) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * Update user.rb * Update themes_controller_spec.rb * Update routes.rb * Update admins_controller.rb * Removed duplicated code that broke the build after last merge * GRN-78: Restructured some of the views to make the UI more consistent and responsive (#435) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * GRN-78: Cleaned up buttons and moved signin to its own page * GRN-78: Moved the Rooms and Recordings link to nav bar * Merge fix * Views restructure fix (#458) * Added cache to gitlab-ci.yml * Restructured seed * GRN2-99 -> GRN2-106: UI cleanup and refactoring (#478) * GRN2-98: Change Fullname to Full name * GRN2-105: Changed View Users to Manage Users * GRN2-101/103: Updated email to match branding * GRN2-100: Updated Email Sent flash to be more descriptive * GRN2-104: Redirect user to sign in page w/ flash after clicking activation link * GRN2-102: Changed the wording in the verification email * GRN2-99: Added email form validation * GRN2-106: Cleaned up Users list front end * Fixes to rake and admin password validator for passing rubocop * GRN2-113: Fixed issues with admin panel (#479) * GRN2-116: Code clean up after restructure of views (#482) * Removed unused references * Rubocop * Added pagination to admin view (#483) * GRN2-114: Added the ability for admins to ban/unban users (#487) * Added the ability for admins to ban and unban users * Update sessions_helper.rb * Merge branch 'master' into admin-panel (#492) * Updated rubocop gem * Updated rubocop and fixed issues (#490) * Rubocop fixes * GRN2-122: Updated sign in flow for admins and switch design tab to site settings (#489) * Switched design tab to site settings * Update _header with spaces instead of tabs * Added more test cases to increase coverage (#494)
2019-05-03 13:05:12 -04:00
expect(@user.has_role?(:denied)).to eq(true)
expect(flash[:success]).to be_present
expect(response).to redirect_to(admins_path)
end
end
context "POST #unban" do
it "unbans the user from the application" do
@request.session[:user_id] = @admin.id
Merge v2.6-alpha (#1672) * GRN2-xx: Switch the relation between users and roles to make queries cleaner and faster (#1299) * First steps * Fixes in account creation flow * Fixed most testcases * more test fixes * Fixed more test cases * Passing tests and rubocop * Added rake task to remove rooms * Adding translation (#1510) * Update _account.html.erb * Update en.yml * Fix "for" attribute for label elements (#1488) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix some issues reported by LGTM (#1478) * Declare local JavaScript variables (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Remove unused local JavaScript variable (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Puma Worker Configuration (#1332) We noticed that the current default settings perform very poorly under load. We managed to literally take down Greenlight during a larger event when people where accessing the landing page for rooms and when doing some tests, I was more or less able to DoS Greenlight on my own. This patch adds a default worker configuration which significantly improves the situation. The small, 4 core machine I was testing on could handle about thrice the amount of requests. While the new default configuration should be reasonably well suited for most deployments, this patch further allows users to easily configure the worker pool on their own in the environment file. * Made name and email readonly for no greenlight accounts (#1534) * Fixed hardcoded string (#1532) * fixed spelling error that was bugging me :) - sep a rat e (#1535) Co-authored-by: Dave Lane <dave@oerfoundation.org> * Improve Server Rooms View (#1524) * Order rooms by status * Cleaned up order function * Now displays Started/Created/Ended * Added participant count to rooms list * Fix rake task user:create so that users can be created when terms are present (#1565) * Changed user create task to always accept terms * clean up * More secure room ID (#1451) * Legal and privpolicy link (#1421) * add customizable Links to Imprint and Privacy Policy * fix copy&paste error in spec * replace "imprint" with "legal" since that is the correct term * remove german translation of new strings, transifex will take care of them later * GRN2-295:Refactored update profile and update password (#1591) * Refactored update profile and update password * Relowered rubocop settings * Fixed email sending when not supposed to (#1592) * Design changes for small screens (#1580) * now rap for pagination * Update _subtitle.html.erb * Update _rooms.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update _users.html.erb * Update cant_create_rooms.html.erb * Update room.js * Update edit.html.erb * Update new.html.erb * Update cant_create_rooms.html.erb * Update _sessions.html.erb * Update _account.html.erb * Make Greenlight work with Ruby 2.7 (#1560) Greenlight's failure to start up with Ruby 2.7 seems to be caused by [an issue in bootsnap](https://github.com/Shopify/bootsnap/issues/258). Updating that library makes Greenlight work again. However, there are still a lot of deprecation warnings. But that's something to deal with separately. This fixes #1558 * use email input for sign in (#1199) * use email input for sign in * use email input for registration * use email input for invitation * use email input for account settings Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix Gemfile (#1593) * Fixed invalid token for password reset (#1632) * HELP_URL env variable now works as expected (#1636) * #1372 Fix for long Text in Table + Remove invalid HTML Tag (#1403) * removed invalid HTML Tag * removed invalid HTML Tag * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _server_recording_row.html.erb form-inline replaced by own css * Update _server_room_row.html.erb * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _public_recording_row.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update main.scss fix for long text * Update main.scss * Update _public_recording_row.html.erb * Added more validation on profile image (#1644) * Users who can't create rooms but have shared rooms now have a different view (#1649) * Revert "Puma Worker Configuration (#1332)" (#1667) This reverts commit 78ed8d74601b613af3fd96ccf75a6bada24deddd. * Removed html safe from all flash messages (#1668) * Remove hardcoded guest=true if require mod approval is set (#1669) * Change random generation for room uid (#1670) * GRN2-290: Update gems and update to Rails 5.2.4.3 (#1671) * Update gems and update to Rails 5.2.4.3 * remove gemfile error Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: Florian Weber <fnwbr@users.noreply.github.com> Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Lars Kiesow <lkiesow@uos.de> Co-authored-by: Dave Lane <dave@lane.net.nz> Co-authored-by: Dave Lane <dave@oerfoundation.org> Co-authored-by: Henning <hng@users.noreply.github.com> Co-authored-by: Marcel Waldvogel <marcel@waldvogel.family> Co-authored-by: Christian Marg <marg@rz.tu-clausthal.de> Co-authored-by: Klaus <klaus@jsxc.org>
2020-05-26 17:37:23 -04:00
@user.set_role :denied
Admin panel (#496) * Added the administrator role and functionality that comes with it (#403) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * Update user.rb * Update admins.js * GRN-15: Added the ability to change color and image from admin interface (#425) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Update user.rb * Update user.rb * Update routes.rb * Update admins_controller.rb * GRN-87:Added a super admin role and made changes to how to the design works (#430) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * Update user.rb * Update themes_controller_spec.rb * Update routes.rb * Update admins_controller.rb * Removed duplicated code that broke the build after last merge * GRN-78: Restructured some of the views to make the UI more consistent and responsive (#435) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * GRN-78: Cleaned up buttons and moved signin to its own page * GRN-78: Moved the Rooms and Recordings link to nav bar * Merge fix * Views restructure fix (#458) * Added cache to gitlab-ci.yml * Restructured seed * GRN2-99 -> GRN2-106: UI cleanup and refactoring (#478) * GRN2-98: Change Fullname to Full name * GRN2-105: Changed View Users to Manage Users * GRN2-101/103: Updated email to match branding * GRN2-100: Updated Email Sent flash to be more descriptive * GRN2-104: Redirect user to sign in page w/ flash after clicking activation link * GRN2-102: Changed the wording in the verification email * GRN2-99: Added email form validation * GRN2-106: Cleaned up Users list front end * Fixes to rake and admin password validator for passing rubocop * GRN2-113: Fixed issues with admin panel (#479) * GRN2-116: Code clean up after restructure of views (#482) * Removed unused references * Rubocop * Added pagination to admin view (#483) * GRN2-114: Added the ability for admins to ban/unban users (#487) * Added the ability for admins to ban and unban users * Update sessions_helper.rb * Merge branch 'master' into admin-panel (#492) * Updated rubocop gem * Updated rubocop and fixed issues (#490) * Rubocop fixes * GRN2-122: Updated sign in flow for admins and switch design tab to site settings (#489) * Switched design tab to site settings * Update _header with spaces instead of tabs * Added more test cases to increase coverage (#494)
2019-05-03 13:05:12 -04:00
expect(@user.has_role?(:denied)).to eq(true)
post :unban_user, params: { user_uid: @user.uid }
@user.reload
Admin panel (#496) * Added the administrator role and functionality that comes with it (#403) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * Update user.rb * Update admins.js * GRN-15: Added the ability to change color and image from admin interface (#425) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Update user.rb * Update user.rb * Update routes.rb * Update admins_controller.rb * GRN-87:Added a super admin role and made changes to how to the design works (#430) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * Update user.rb * Update themes_controller_spec.rb * Update routes.rb * Update admins_controller.rb * Removed duplicated code that broke the build after last merge * GRN-78: Restructured some of the views to make the UI more consistent and responsive (#435) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * GRN-78: Cleaned up buttons and moved signin to its own page * GRN-78: Moved the Rooms and Recordings link to nav bar * Merge fix * Views restructure fix (#458) * Added cache to gitlab-ci.yml * Restructured seed * GRN2-99 -> GRN2-106: UI cleanup and refactoring (#478) * GRN2-98: Change Fullname to Full name * GRN2-105: Changed View Users to Manage Users * GRN2-101/103: Updated email to match branding * GRN2-100: Updated Email Sent flash to be more descriptive * GRN2-104: Redirect user to sign in page w/ flash after clicking activation link * GRN2-102: Changed the wording in the verification email * GRN2-99: Added email form validation * GRN2-106: Cleaned up Users list front end * Fixes to rake and admin password validator for passing rubocop * GRN2-113: Fixed issues with admin panel (#479) * GRN2-116: Code clean up after restructure of views (#482) * Removed unused references * Rubocop * Added pagination to admin view (#483) * GRN2-114: Added the ability for admins to ban/unban users (#487) * Added the ability for admins to ban and unban users * Update sessions_helper.rb * Merge branch 'master' into admin-panel (#492) * Updated rubocop gem * Updated rubocop and fixed issues (#490) * Rubocop fixes * GRN2-122: Updated sign in flow for admins and switch design tab to site settings (#489) * Switched design tab to site settings * Update _header with spaces instead of tabs * Added more test cases to increase coverage (#494)
2019-05-03 13:05:12 -04:00
expect(@user.has_role?(:denied)).to eq(false)
expect(flash[:success]).to be_present
expect(response).to redirect_to(admins_path)
end
end
context "POST #invite" do
before do
allow(Rails.configuration).to receive(:loadbalanced_configuration).and_return(true)
allow_any_instance_of(ApplicationController).to receive(:allow_greenlight_accounts?).and_return(true)
allow_any_instance_of(User).to receive(:greenlight_account?).and_return(true)
end
it "invites a user" do
@request.session[:user_id] = @admin.id
email = Faker::Internet.email
post :invite, params: { invite_user: { email: email } }
2019-07-23 14:53:48 -04:00
invite = Invitation.find_by(email: email, provider: "provider1")
expect(invite.present?).to eq(true)
expect(flash[:success]).to be_present
expect(response).to redirect_to(admins_path)
end
it "sends an invitation email" do
@request.session[:user_id] = @admin.id
email = Faker::Internet.email
params = { invite_user: { email: email } }
expect { post :invite, params: params }.to change { ActionMailer::Base.deliveries.count }.by(1)
end
it "invites multiple users" do
@request.session[:user_id] = @admin.id
email = "#{Faker::Internet.email},#{Faker::Internet.email},#{Faker::Internet.email},#{Faker::Internet.email}"
post :invite, params: { invite_user: { email: email } }
invite = Invitation.find_by(email: email.split(",")[0], provider: "provider1")
expect(invite.present?).to eq(true)
invite1 = Invitation.find_by(email: email.split(",")[1], provider: "provider1")
expect(invite1.present?).to eq(true)
invite2 = Invitation.find_by(email: email.split(",")[2], provider: "provider1")
expect(invite2.present?).to eq(true)
invite3 = Invitation.find_by(email: email.split(",")[3], provider: "provider1")
expect(invite3.present?).to eq(true)
expect(flash[:success]).to be_present
expect(response).to redirect_to(admins_path)
end
it "sends multiple invitation emails" do
@request.session[:user_id] = @admin.id
email = "#{Faker::Internet.email},#{Faker::Internet.email},#{Faker::Internet.email},#{Faker::Internet.email}"
params = { invite_user: { email: email } }
expect { post :invite, params: params }.to change { ActionMailer::Base.deliveries.count }.by(4)
end
end
context "POST #approve" do
it "approves a pending user" do
@request.session[:user_id] = @admin.id
Merge v2.6-alpha (#1672) * GRN2-xx: Switch the relation between users and roles to make queries cleaner and faster (#1299) * First steps * Fixes in account creation flow * Fixed most testcases * more test fixes * Fixed more test cases * Passing tests and rubocop * Added rake task to remove rooms * Adding translation (#1510) * Update _account.html.erb * Update en.yml * Fix "for" attribute for label elements (#1488) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix some issues reported by LGTM (#1478) * Declare local JavaScript variables (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Remove unused local JavaScript variable (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Puma Worker Configuration (#1332) We noticed that the current default settings perform very poorly under load. We managed to literally take down Greenlight during a larger event when people where accessing the landing page for rooms and when doing some tests, I was more or less able to DoS Greenlight on my own. This patch adds a default worker configuration which significantly improves the situation. The small, 4 core machine I was testing on could handle about thrice the amount of requests. While the new default configuration should be reasonably well suited for most deployments, this patch further allows users to easily configure the worker pool on their own in the environment file. * Made name and email readonly for no greenlight accounts (#1534) * Fixed hardcoded string (#1532) * fixed spelling error that was bugging me :) - sep a rat e (#1535) Co-authored-by: Dave Lane <dave@oerfoundation.org> * Improve Server Rooms View (#1524) * Order rooms by status * Cleaned up order function * Now displays Started/Created/Ended * Added participant count to rooms list * Fix rake task user:create so that users can be created when terms are present (#1565) * Changed user create task to always accept terms * clean up * More secure room ID (#1451) * Legal and privpolicy link (#1421) * add customizable Links to Imprint and Privacy Policy * fix copy&paste error in spec * replace "imprint" with "legal" since that is the correct term * remove german translation of new strings, transifex will take care of them later * GRN2-295:Refactored update profile and update password (#1591) * Refactored update profile and update password * Relowered rubocop settings * Fixed email sending when not supposed to (#1592) * Design changes for small screens (#1580) * now rap for pagination * Update _subtitle.html.erb * Update _rooms.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update _users.html.erb * Update cant_create_rooms.html.erb * Update room.js * Update edit.html.erb * Update new.html.erb * Update cant_create_rooms.html.erb * Update _sessions.html.erb * Update _account.html.erb * Make Greenlight work with Ruby 2.7 (#1560) Greenlight's failure to start up with Ruby 2.7 seems to be caused by [an issue in bootsnap](https://github.com/Shopify/bootsnap/issues/258). Updating that library makes Greenlight work again. However, there are still a lot of deprecation warnings. But that's something to deal with separately. This fixes #1558 * use email input for sign in (#1199) * use email input for sign in * use email input for registration * use email input for invitation * use email input for account settings Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix Gemfile (#1593) * Fixed invalid token for password reset (#1632) * HELP_URL env variable now works as expected (#1636) * #1372 Fix for long Text in Table + Remove invalid HTML Tag (#1403) * removed invalid HTML Tag * removed invalid HTML Tag * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _server_recording_row.html.erb form-inline replaced by own css * Update _server_room_row.html.erb * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _public_recording_row.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update main.scss fix for long text * Update main.scss * Update _public_recording_row.html.erb * Added more validation on profile image (#1644) * Users who can't create rooms but have shared rooms now have a different view (#1649) * Revert "Puma Worker Configuration (#1332)" (#1667) This reverts commit 78ed8d74601b613af3fd96ccf75a6bada24deddd. * Removed html safe from all flash messages (#1668) * Remove hardcoded guest=true if require mod approval is set (#1669) * Change random generation for room uid (#1670) * GRN2-290: Update gems and update to Rails 5.2.4.3 (#1671) * Update gems and update to Rails 5.2.4.3 * remove gemfile error Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: Florian Weber <fnwbr@users.noreply.github.com> Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Lars Kiesow <lkiesow@uos.de> Co-authored-by: Dave Lane <dave@lane.net.nz> Co-authored-by: Dave Lane <dave@oerfoundation.org> Co-authored-by: Henning <hng@users.noreply.github.com> Co-authored-by: Marcel Waldvogel <marcel@waldvogel.family> Co-authored-by: Christian Marg <marg@rz.tu-clausthal.de> Co-authored-by: Klaus <klaus@jsxc.org>
2020-05-26 17:37:23 -04:00
@user.set_role :pending
post :approve, params: { user_uid: @user.uid }
@user.reload
expect(@user.has_role?(:pending)).to eq(false)
expect(flash[:success]).to be_present
expect(response).to redirect_to(admins_path)
end
it "sends the user an email telling them theyre approved" do
@request.session[:user_id] = @admin.id
Merge v2.6-alpha (#1672) * GRN2-xx: Switch the relation between users and roles to make queries cleaner and faster (#1299) * First steps * Fixes in account creation flow * Fixed most testcases * more test fixes * Fixed more test cases * Passing tests and rubocop * Added rake task to remove rooms * Adding translation (#1510) * Update _account.html.erb * Update en.yml * Fix "for" attribute for label elements (#1488) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix some issues reported by LGTM (#1478) * Declare local JavaScript variables (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Remove unused local JavaScript variable (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Puma Worker Configuration (#1332) We noticed that the current default settings perform very poorly under load. We managed to literally take down Greenlight during a larger event when people where accessing the landing page for rooms and when doing some tests, I was more or less able to DoS Greenlight on my own. This patch adds a default worker configuration which significantly improves the situation. The small, 4 core machine I was testing on could handle about thrice the amount of requests. While the new default configuration should be reasonably well suited for most deployments, this patch further allows users to easily configure the worker pool on their own in the environment file. * Made name and email readonly for no greenlight accounts (#1534) * Fixed hardcoded string (#1532) * fixed spelling error that was bugging me :) - sep a rat e (#1535) Co-authored-by: Dave Lane <dave@oerfoundation.org> * Improve Server Rooms View (#1524) * Order rooms by status * Cleaned up order function * Now displays Started/Created/Ended * Added participant count to rooms list * Fix rake task user:create so that users can be created when terms are present (#1565) * Changed user create task to always accept terms * clean up * More secure room ID (#1451) * Legal and privpolicy link (#1421) * add customizable Links to Imprint and Privacy Policy * fix copy&paste error in spec * replace "imprint" with "legal" since that is the correct term * remove german translation of new strings, transifex will take care of them later * GRN2-295:Refactored update profile and update password (#1591) * Refactored update profile and update password * Relowered rubocop settings * Fixed email sending when not supposed to (#1592) * Design changes for small screens (#1580) * now rap for pagination * Update _subtitle.html.erb * Update _rooms.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update _users.html.erb * Update cant_create_rooms.html.erb * Update room.js * Update edit.html.erb * Update new.html.erb * Update cant_create_rooms.html.erb * Update _sessions.html.erb * Update _account.html.erb * Make Greenlight work with Ruby 2.7 (#1560) Greenlight's failure to start up with Ruby 2.7 seems to be caused by [an issue in bootsnap](https://github.com/Shopify/bootsnap/issues/258). Updating that library makes Greenlight work again. However, there are still a lot of deprecation warnings. But that's something to deal with separately. This fixes #1558 * use email input for sign in (#1199) * use email input for sign in * use email input for registration * use email input for invitation * use email input for account settings Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix Gemfile (#1593) * Fixed invalid token for password reset (#1632) * HELP_URL env variable now works as expected (#1636) * #1372 Fix for long Text in Table + Remove invalid HTML Tag (#1403) * removed invalid HTML Tag * removed invalid HTML Tag * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _server_recording_row.html.erb form-inline replaced by own css * Update _server_room_row.html.erb * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _public_recording_row.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update main.scss fix for long text * Update main.scss * Update _public_recording_row.html.erb * Added more validation on profile image (#1644) * Users who can't create rooms but have shared rooms now have a different view (#1649) * Revert "Puma Worker Configuration (#1332)" (#1667) This reverts commit 78ed8d74601b613af3fd96ccf75a6bada24deddd. * Removed html safe from all flash messages (#1668) * Remove hardcoded guest=true if require mod approval is set (#1669) * Change random generation for room uid (#1670) * GRN2-290: Update gems and update to Rails 5.2.4.3 (#1671) * Update gems and update to Rails 5.2.4.3 * remove gemfile error Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: Florian Weber <fnwbr@users.noreply.github.com> Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Lars Kiesow <lkiesow@uos.de> Co-authored-by: Dave Lane <dave@lane.net.nz> Co-authored-by: Dave Lane <dave@oerfoundation.org> Co-authored-by: Henning <hng@users.noreply.github.com> Co-authored-by: Marcel Waldvogel <marcel@waldvogel.family> Co-authored-by: Christian Marg <marg@rz.tu-clausthal.de> Co-authored-by: Klaus <klaus@jsxc.org>
2020-05-26 17:37:23 -04:00
@user.set_role :pending
params = { user_uid: @user.uid }
expect { post :approve, params: params }.to change { ActionMailer::Base.deliveries.count }.by(1)
end
end
context "POST #undelete" do
it "undeletes a user" do
@request.session[:user_id] = @admin.id
@user.delete
expect(User.find_by(uid: @user.uid)).to be_nil
post :undelete, params: { user_uid: @user.uid }
expect(User.find_by(uid: @user.uid)).to be_present
expect(flash[:success]).to be_present
expect(response).to redirect_to(admins_path)
end
it "undeletes the users rooms" do
@request.session[:user_id] = @admin.id
@user.main_room.delete
@user.delete
expect(Room.find_by(uid: @user.main_room.uid)).to be_nil
post :undelete, params: { user_uid: @user.uid }
expect(Room.find_by(uid: @user.main_room.uid)).to be_present
expect(flash[:success]).to be_present
expect(response).to redirect_to(admins_path)
end
end
context "POST #merge_user" do
it "merges the users room to the primary account and deletes the old user" do
@request.session[:user_id] = @admin.id
@user2 = create(:user)
room1 = create(:room, owner: @user2)
room2 = create(:room, owner: @user2)
room3 = @user2.main_room
post :merge_user, params: { user_uid: @user.uid, merge: @user2.uid }
room1.reload
room2.reload
room3.reload
expect(User.exists?(uid: @user2.uid)).to be false
expect(room1.name).to start_with("(Merged)")
expect(room2.name).to start_with("(Merged)")
expect(room3.name).to start_with("(Merged)")
expect(room1.owner).to eq(@user)
expect(room2.owner).to eq(@user)
expect(room3.owner).to eq(@user)
expect(flash[:success]).to be_present
expect(response).to redirect_to(admins_path)
end
it "does not merge if trying to merge the same user into themself" do
@request.session[:user_id] = @admin.id
post :merge_user, params: { user_uid: @user.uid, merge: @user.uid }
expect(flash[:alert]).to be_present
expect(response).to redirect_to(admins_path)
end
end
context "POST permissions" do
it "allows a user with the correct permission to manage users" do
Role.create_new_role("test", "greenlight").update_all_role_permissions(can_manage_users: true)
@user2 = create(:user)
Merge v2.6-alpha (#1672) * GRN2-xx: Switch the relation between users and roles to make queries cleaner and faster (#1299) * First steps * Fixes in account creation flow * Fixed most testcases * more test fixes * Fixed more test cases * Passing tests and rubocop * Added rake task to remove rooms * Adding translation (#1510) * Update _account.html.erb * Update en.yml * Fix "for" attribute for label elements (#1488) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix some issues reported by LGTM (#1478) * Declare local JavaScript variables (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Remove unused local JavaScript variable (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Puma Worker Configuration (#1332) We noticed that the current default settings perform very poorly under load. We managed to literally take down Greenlight during a larger event when people where accessing the landing page for rooms and when doing some tests, I was more or less able to DoS Greenlight on my own. This patch adds a default worker configuration which significantly improves the situation. The small, 4 core machine I was testing on could handle about thrice the amount of requests. While the new default configuration should be reasonably well suited for most deployments, this patch further allows users to easily configure the worker pool on their own in the environment file. * Made name and email readonly for no greenlight accounts (#1534) * Fixed hardcoded string (#1532) * fixed spelling error that was bugging me :) - sep a rat e (#1535) Co-authored-by: Dave Lane <dave@oerfoundation.org> * Improve Server Rooms View (#1524) * Order rooms by status * Cleaned up order function * Now displays Started/Created/Ended * Added participant count to rooms list * Fix rake task user:create so that users can be created when terms are present (#1565) * Changed user create task to always accept terms * clean up * More secure room ID (#1451) * Legal and privpolicy link (#1421) * add customizable Links to Imprint and Privacy Policy * fix copy&paste error in spec * replace "imprint" with "legal" since that is the correct term * remove german translation of new strings, transifex will take care of them later * GRN2-295:Refactored update profile and update password (#1591) * Refactored update profile and update password * Relowered rubocop settings * Fixed email sending when not supposed to (#1592) * Design changes for small screens (#1580) * now rap for pagination * Update _subtitle.html.erb * Update _rooms.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update _users.html.erb * Update cant_create_rooms.html.erb * Update room.js * Update edit.html.erb * Update new.html.erb * Update cant_create_rooms.html.erb * Update _sessions.html.erb * Update _account.html.erb * Make Greenlight work with Ruby 2.7 (#1560) Greenlight's failure to start up with Ruby 2.7 seems to be caused by [an issue in bootsnap](https://github.com/Shopify/bootsnap/issues/258). Updating that library makes Greenlight work again. However, there are still a lot of deprecation warnings. But that's something to deal with separately. This fixes #1558 * use email input for sign in (#1199) * use email input for sign in * use email input for registration * use email input for invitation * use email input for account settings Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix Gemfile (#1593) * Fixed invalid token for password reset (#1632) * HELP_URL env variable now works as expected (#1636) * #1372 Fix for long Text in Table + Remove invalid HTML Tag (#1403) * removed invalid HTML Tag * removed invalid HTML Tag * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _server_recording_row.html.erb form-inline replaced by own css * Update _server_room_row.html.erb * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _public_recording_row.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update main.scss fix for long text * Update main.scss * Update _public_recording_row.html.erb * Added more validation on profile image (#1644) * Users who can't create rooms but have shared rooms now have a different view (#1649) * Revert "Puma Worker Configuration (#1332)" (#1667) This reverts commit 78ed8d74601b613af3fd96ccf75a6bada24deddd. * Removed html safe from all flash messages (#1668) * Remove hardcoded guest=true if require mod approval is set (#1669) * Change random generation for room uid (#1670) * GRN2-290: Update gems and update to Rails 5.2.4.3 (#1671) * Update gems and update to Rails 5.2.4.3 * remove gemfile error Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: Florian Weber <fnwbr@users.noreply.github.com> Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Lars Kiesow <lkiesow@uos.de> Co-authored-by: Dave Lane <dave@lane.net.nz> Co-authored-by: Dave Lane <dave@oerfoundation.org> Co-authored-by: Henning <hng@users.noreply.github.com> Co-authored-by: Marcel Waldvogel <marcel@waldvogel.family> Co-authored-by: Christian Marg <marg@rz.tu-clausthal.de> Co-authored-by: Klaus <klaus@jsxc.org>
2020-05-26 17:37:23 -04:00
@user2.set_role(:test)
# Random manage user action test
@request.session[:user_id] = @user2.id
expect(@user.has_role?(:denied)).to eq(false)
post :ban_user, params: { user_uid: @user.uid }
@user.reload
expect(@user.has_role?(:denied)).to eq(true)
expect(flash[:success]).to be_present
expect(response).to redirect_to(admins_path)
end
it "doesn't allow a user with the incorrect permission to manage users" do
Role.create_new_role("test", "greenlight").update_all_role_permissions(can_manage_users: false)
@user2 = create(:user)
Merge v2.6-alpha (#1672) * GRN2-xx: Switch the relation between users and roles to make queries cleaner and faster (#1299) * First steps * Fixes in account creation flow * Fixed most testcases * more test fixes * Fixed more test cases * Passing tests and rubocop * Added rake task to remove rooms * Adding translation (#1510) * Update _account.html.erb * Update en.yml * Fix "for" attribute for label elements (#1488) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix some issues reported by LGTM (#1478) * Declare local JavaScript variables (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Remove unused local JavaScript variable (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Puma Worker Configuration (#1332) We noticed that the current default settings perform very poorly under load. We managed to literally take down Greenlight during a larger event when people where accessing the landing page for rooms and when doing some tests, I was more or less able to DoS Greenlight on my own. This patch adds a default worker configuration which significantly improves the situation. The small, 4 core machine I was testing on could handle about thrice the amount of requests. While the new default configuration should be reasonably well suited for most deployments, this patch further allows users to easily configure the worker pool on their own in the environment file. * Made name and email readonly for no greenlight accounts (#1534) * Fixed hardcoded string (#1532) * fixed spelling error that was bugging me :) - sep a rat e (#1535) Co-authored-by: Dave Lane <dave@oerfoundation.org> * Improve Server Rooms View (#1524) * Order rooms by status * Cleaned up order function * Now displays Started/Created/Ended * Added participant count to rooms list * Fix rake task user:create so that users can be created when terms are present (#1565) * Changed user create task to always accept terms * clean up * More secure room ID (#1451) * Legal and privpolicy link (#1421) * add customizable Links to Imprint and Privacy Policy * fix copy&paste error in spec * replace "imprint" with "legal" since that is the correct term * remove german translation of new strings, transifex will take care of them later * GRN2-295:Refactored update profile and update password (#1591) * Refactored update profile and update password * Relowered rubocop settings * Fixed email sending when not supposed to (#1592) * Design changes for small screens (#1580) * now rap for pagination * Update _subtitle.html.erb * Update _rooms.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update _users.html.erb * Update cant_create_rooms.html.erb * Update room.js * Update edit.html.erb * Update new.html.erb * Update cant_create_rooms.html.erb * Update _sessions.html.erb * Update _account.html.erb * Make Greenlight work with Ruby 2.7 (#1560) Greenlight's failure to start up with Ruby 2.7 seems to be caused by [an issue in bootsnap](https://github.com/Shopify/bootsnap/issues/258). Updating that library makes Greenlight work again. However, there are still a lot of deprecation warnings. But that's something to deal with separately. This fixes #1558 * use email input for sign in (#1199) * use email input for sign in * use email input for registration * use email input for invitation * use email input for account settings Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix Gemfile (#1593) * Fixed invalid token for password reset (#1632) * HELP_URL env variable now works as expected (#1636) * #1372 Fix for long Text in Table + Remove invalid HTML Tag (#1403) * removed invalid HTML Tag * removed invalid HTML Tag * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _server_recording_row.html.erb form-inline replaced by own css * Update _server_room_row.html.erb * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _public_recording_row.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update main.scss fix for long text * Update main.scss * Update _public_recording_row.html.erb * Added more validation on profile image (#1644) * Users who can't create rooms but have shared rooms now have a different view (#1649) * Revert "Puma Worker Configuration (#1332)" (#1667) This reverts commit 78ed8d74601b613af3fd96ccf75a6bada24deddd. * Removed html safe from all flash messages (#1668) * Remove hardcoded guest=true if require mod approval is set (#1669) * Change random generation for room uid (#1670) * GRN2-290: Update gems and update to Rails 5.2.4.3 (#1671) * Update gems and update to Rails 5.2.4.3 * remove gemfile error Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: Florian Weber <fnwbr@users.noreply.github.com> Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Lars Kiesow <lkiesow@uos.de> Co-authored-by: Dave Lane <dave@lane.net.nz> Co-authored-by: Dave Lane <dave@oerfoundation.org> Co-authored-by: Henning <hng@users.noreply.github.com> Co-authored-by: Marcel Waldvogel <marcel@waldvogel.family> Co-authored-by: Christian Marg <marg@rz.tu-clausthal.de> Co-authored-by: Klaus <klaus@jsxc.org>
2020-05-26 17:37:23 -04:00
@user2.set_role(:test)
# Random manage user action test
@request.session[:user_id] = @user2.id
expect(@user.has_role?(:denied)).to eq(false)
post :ban_user, params: { user_uid: @user.uid }
expect(response).to render_template "errors/greenlight_error"
end
end
Admin panel (#496) * Added the administrator role and functionality that comes with it (#403) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * Update user.rb * Update admins.js * GRN-15: Added the ability to change color and image from admin interface (#425) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Update user.rb * Update user.rb * Update routes.rb * Update admins_controller.rb * GRN-87:Added a super admin role and made changes to how to the design works (#430) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * Update user.rb * Update themes_controller_spec.rb * Update routes.rb * Update admins_controller.rb * Removed duplicated code that broke the build after last merge * GRN-78: Restructured some of the views to make the UI more consistent and responsive (#435) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * GRN-78: Cleaned up buttons and moved signin to its own page * GRN-78: Moved the Rooms and Recordings link to nav bar * Merge fix * Views restructure fix (#458) * Added cache to gitlab-ci.yml * Restructured seed * GRN2-99 -> GRN2-106: UI cleanup and refactoring (#478) * GRN2-98: Change Fullname to Full name * GRN2-105: Changed View Users to Manage Users * GRN2-101/103: Updated email to match branding * GRN2-100: Updated Email Sent flash to be more descriptive * GRN2-104: Redirect user to sign in page w/ flash after clicking activation link * GRN2-102: Changed the wording in the verification email * GRN2-99: Added email form validation * GRN2-106: Cleaned up Users list front end * Fixes to rake and admin password validator for passing rubocop * GRN2-113: Fixed issues with admin panel (#479) * GRN2-116: Code clean up after restructure of views (#482) * Removed unused references * Rubocop * Added pagination to admin view (#483) * GRN2-114: Added the ability for admins to ban/unban users (#487) * Added the ability for admins to ban and unban users * Update sessions_helper.rb * Merge branch 'master' into admin-panel (#492) * Updated rubocop gem * Updated rubocop and fixed issues (#490) * Rubocop fixes * GRN2-122: Updated sign in flow for admins and switch design tab to site settings (#489) * Switched design tab to site settings * Update _header with spaces instead of tabs * Added more test cases to increase coverage (#494)
2019-05-03 13:05:12 -04:00
end
describe "User Design" do
context "POST #branding" do
it "changes the branding image on the page" do
allow(Rails.configuration).to receive(:loadbalanced_configuration).and_return(true)
allow_any_instance_of(User).to receive(:greenlight_account?).and_return(true)
@request.session[:user_id] = @admin.id
fake_image_url = "example.com"
Merge v2.7-alpha (#1951) * Fix wrong conditional (reported by LGTM) (#1477) Signed-off-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Bump rack from 2.2.2 to 2.2.3 (#1839) Bumps [rack](https://github.com/rack/rack) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v2.2.2...2.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [FIX] Unable to edit long recording names #1776 (#1780) * Allow to set a filter for LDAP authentication * [FIX] Unable to edit long recording names #1776 Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: farhatahmad <ahmad.af.farhat@gmail.com> * Desgin for Manage Users Tabs (#1777) * Update _subtitle.html.erb * Update _manage_users_tags.html.erb * Update admins.scss * Update _primary_themes.scss * Update _manage_users_tags.html.erb * Minor style changes to manage users (#1845) * Maintenance banner moved to admin site (#1775) * initial * finish * travis fixes * travis again * not required * Co-authored-by: Tobias Fiebig <t.fiebig@tudelft.nl> (#1296) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Enhance Room OpenGraph Metadata (#1601) * Revert "Enhance Room OpenGraph Metadata (#1601)" (#1852) This reverts commit 3b007c233ae12e0407f216ae269c63d6179f73b8. * GRN2-xx: Tab title now displays the current page name (#1853) * Tab title now displays the current page name * Added page title for the rest of the pages * Split Site Settings into 3 different tabs (#1858) * Split Site Settings into 3 different tabs * Fix copyright * Added redirect to correct tab * Make sure settings are displaying when they should * Update en.yml (#1857) * Build images for alpha branches (#1867) * Upgraded jquery to latest version (#1896) * Added favicon tag (#1898) * Fixed XSS issue with role name (#1899) * Update path for coloring redirect (#1908) * Added a fourth section to the room uid (#1910) * Fixed issue with insecure room sharing removal (#1914) * Fixes typo (#1917) Fixes typo: successfully was written incorrect. * Fixed order of rooms in server rooms (#1915) * Change default room sort to latest activity (#1919) * GRN2-xx: Small changes/improvements to the recording settings (#1851) * Small changes/improvements to the recording settings * Replaced room warning with info flash * Added global setting to enable/disable the recording consent feature * Replace Legal with Terms (#1931) * Added a more friendly OpenGraph description when invited to join a room (#1932) * Fixed issue causing maintenance banner not to hide correctly (#1933) * Hide recording menu and recording list when it is disabled (#1935) * Hide recording menu and recording list when it is disabled * Hide recording list when disabled * GRN2-xx: Added an auto-refresh after 2 mins while waiting for room to start (#1947) * Added an auto-refresh after 2 mins while waiting for room to start * Fixed random issue with test case * GRN2-xx: Added ability to preupload presentations to rooms (#1895) * Added ability to preupload presentations to rooms (#1868) * Added setting to site settings and allowed admins to change the presentation * Added AWS S3 and GCS Storage ENV variables * Added check to ensure file extension is correct * Added icon to remove presentation * Added testcases for preupload * Add nginx redirect to solve issue with relative root * Record title, instead of room name, in the popup (#1924) * Update _public_recording_row.html.erb * Update _recording_row.html.erb Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: beckerr-rzht <beckerr@hochschule-trier.de> Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: yanosz <yanosz@users.noreply.github.com> Co-authored-by: Moritz Schlarb <moschlar@metalabs.de> Co-authored-by: chronikum <34622984+chronikum@users.noreply.github.com> Co-authored-by: Mitsutaka Sato <miztaka@honestyworks.jp> Co-authored-by: hiroshisuga <45039819+hiroshisuga@users.noreply.github.com>
2020-07-29 11:03:22 -04:00
post :update_settings, params: { setting: "Branding Image", value: fake_image_url, tab: "appearance" }
Admin panel (#496) * Added the administrator role and functionality that comes with it (#403) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * Update user.rb * Update admins.js * GRN-15: Added the ability to change color and image from admin interface (#425) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Update user.rb * Update user.rb * Update routes.rb * Update admins_controller.rb * GRN-87:Added a super admin role and made changes to how to the design works (#430) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * Update user.rb * Update themes_controller_spec.rb * Update routes.rb * Update admins_controller.rb * Removed duplicated code that broke the build after last merge * GRN-78: Restructured some of the views to make the UI more consistent and responsive (#435) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * GRN-78: Cleaned up buttons and moved signin to its own page * GRN-78: Moved the Rooms and Recordings link to nav bar * Merge fix * Views restructure fix (#458) * Added cache to gitlab-ci.yml * Restructured seed * GRN2-99 -> GRN2-106: UI cleanup and refactoring (#478) * GRN2-98: Change Fullname to Full name * GRN2-105: Changed View Users to Manage Users * GRN2-101/103: Updated email to match branding * GRN2-100: Updated Email Sent flash to be more descriptive * GRN2-104: Redirect user to sign in page w/ flash after clicking activation link * GRN2-102: Changed the wording in the verification email * GRN2-99: Added email form validation * GRN2-106: Cleaned up Users list front end * Fixes to rake and admin password validator for passing rubocop * GRN2-113: Fixed issues with admin panel (#479) * GRN2-116: Code clean up after restructure of views (#482) * Removed unused references * Rubocop * Added pagination to admin view (#483) * GRN2-114: Added the ability for admins to ban/unban users (#487) * Added the ability for admins to ban and unban users * Update sessions_helper.rb * Merge branch 'master' into admin-panel (#492) * Updated rubocop gem * Updated rubocop and fixed issues (#490) * Rubocop fixes * GRN2-122: Updated sign in flow for admins and switch design tab to site settings (#489) * Switched design tab to site settings * Update _header with spaces instead of tabs * Added more test cases to increase coverage (#494)
2019-05-03 13:05:12 -04:00
feature = Setting.find_by(provider: "provider1").features.find_by(name: "Branding Image")
expect(feature[:value]).to eq(fake_image_url)
Merge v2.7-alpha (#1951) * Fix wrong conditional (reported by LGTM) (#1477) Signed-off-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Bump rack from 2.2.2 to 2.2.3 (#1839) Bumps [rack](https://github.com/rack/rack) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v2.2.2...2.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [FIX] Unable to edit long recording names #1776 (#1780) * Allow to set a filter for LDAP authentication * [FIX] Unable to edit long recording names #1776 Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: farhatahmad <ahmad.af.farhat@gmail.com> * Desgin for Manage Users Tabs (#1777) * Update _subtitle.html.erb * Update _manage_users_tags.html.erb * Update admins.scss * Update _primary_themes.scss * Update _manage_users_tags.html.erb * Minor style changes to manage users (#1845) * Maintenance banner moved to admin site (#1775) * initial * finish * travis fixes * travis again * not required * Co-authored-by: Tobias Fiebig <t.fiebig@tudelft.nl> (#1296) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Enhance Room OpenGraph Metadata (#1601) * Revert "Enhance Room OpenGraph Metadata (#1601)" (#1852) This reverts commit 3b007c233ae12e0407f216ae269c63d6179f73b8. * GRN2-xx: Tab title now displays the current page name (#1853) * Tab title now displays the current page name * Added page title for the rest of the pages * Split Site Settings into 3 different tabs (#1858) * Split Site Settings into 3 different tabs * Fix copyright * Added redirect to correct tab * Make sure settings are displaying when they should * Update en.yml (#1857) * Build images for alpha branches (#1867) * Upgraded jquery to latest version (#1896) * Added favicon tag (#1898) * Fixed XSS issue with role name (#1899) * Update path for coloring redirect (#1908) * Added a fourth section to the room uid (#1910) * Fixed issue with insecure room sharing removal (#1914) * Fixes typo (#1917) Fixes typo: successfully was written incorrect. * Fixed order of rooms in server rooms (#1915) * Change default room sort to latest activity (#1919) * GRN2-xx: Small changes/improvements to the recording settings (#1851) * Small changes/improvements to the recording settings * Replaced room warning with info flash * Added global setting to enable/disable the recording consent feature * Replace Legal with Terms (#1931) * Added a more friendly OpenGraph description when invited to join a room (#1932) * Fixed issue causing maintenance banner not to hide correctly (#1933) * Hide recording menu and recording list when it is disabled (#1935) * Hide recording menu and recording list when it is disabled * Hide recording list when disabled * GRN2-xx: Added an auto-refresh after 2 mins while waiting for room to start (#1947) * Added an auto-refresh after 2 mins while waiting for room to start * Fixed random issue with test case * GRN2-xx: Added ability to preupload presentations to rooms (#1895) * Added ability to preupload presentations to rooms (#1868) * Added setting to site settings and allowed admins to change the presentation * Added AWS S3 and GCS Storage ENV variables * Added check to ensure file extension is correct * Added icon to remove presentation * Added testcases for preupload * Add nginx redirect to solve issue with relative root * Record title, instead of room name, in the popup (#1924) * Update _public_recording_row.html.erb * Update _recording_row.html.erb Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: beckerr-rzht <beckerr@hochschule-trier.de> Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: yanosz <yanosz@users.noreply.github.com> Co-authored-by: Moritz Schlarb <moschlar@metalabs.de> Co-authored-by: chronikum <34622984+chronikum@users.noreply.github.com> Co-authored-by: Mitsutaka Sato <miztaka@honestyworks.jp> Co-authored-by: hiroshisuga <45039819+hiroshisuga@users.noreply.github.com>
2020-07-29 11:03:22 -04:00
expect(response).to redirect_to(admin_site_settings_path(tab: "appearance"))
Admin panel (#496) * Added the administrator role and functionality that comes with it (#403) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * Update user.rb * Update admins.js * GRN-15: Added the ability to change color and image from admin interface (#425) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Update user.rb * Update user.rb * Update routes.rb * Update admins_controller.rb * GRN-87:Added a super admin role and made changes to how to the design works (#430) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * Update user.rb * Update themes_controller_spec.rb * Update routes.rb * Update admins_controller.rb * Removed duplicated code that broke the build after last merge * GRN-78: Restructured some of the views to make the UI more consistent and responsive (#435) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * GRN-78: Cleaned up buttons and moved signin to its own page * GRN-78: Moved the Rooms and Recordings link to nav bar * Merge fix * Views restructure fix (#458) * Added cache to gitlab-ci.yml * Restructured seed * GRN2-99 -> GRN2-106: UI cleanup and refactoring (#478) * GRN2-98: Change Fullname to Full name * GRN2-105: Changed View Users to Manage Users * GRN2-101/103: Updated email to match branding * GRN2-100: Updated Email Sent flash to be more descriptive * GRN2-104: Redirect user to sign in page w/ flash after clicking activation link * GRN2-102: Changed the wording in the verification email * GRN2-99: Added email form validation * GRN2-106: Cleaned up Users list front end * Fixes to rake and admin password validator for passing rubocop * GRN2-113: Fixed issues with admin panel (#479) * GRN2-116: Code clean up after restructure of views (#482) * Removed unused references * Rubocop * Added pagination to admin view (#483) * GRN2-114: Added the ability for admins to ban/unban users (#487) * Added the ability for admins to ban and unban users * Update sessions_helper.rb * Merge branch 'master' into admin-panel (#492) * Updated rubocop gem * Updated rubocop and fixed issues (#490) * Rubocop fixes * GRN2-122: Updated sign in flow for admins and switch design tab to site settings (#489) * Switched design tab to site settings * Update _header with spaces instead of tabs * Added more test cases to increase coverage (#494)
2019-05-03 13:05:12 -04:00
end
end
Merge v2.6-alpha (#1672) * GRN2-xx: Switch the relation between users and roles to make queries cleaner and faster (#1299) * First steps * Fixes in account creation flow * Fixed most testcases * more test fixes * Fixed more test cases * Passing tests and rubocop * Added rake task to remove rooms * Adding translation (#1510) * Update _account.html.erb * Update en.yml * Fix "for" attribute for label elements (#1488) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix some issues reported by LGTM (#1478) * Declare local JavaScript variables (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Remove unused local JavaScript variable (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Puma Worker Configuration (#1332) We noticed that the current default settings perform very poorly under load. We managed to literally take down Greenlight during a larger event when people where accessing the landing page for rooms and when doing some tests, I was more or less able to DoS Greenlight on my own. This patch adds a default worker configuration which significantly improves the situation. The small, 4 core machine I was testing on could handle about thrice the amount of requests. While the new default configuration should be reasonably well suited for most deployments, this patch further allows users to easily configure the worker pool on their own in the environment file. * Made name and email readonly for no greenlight accounts (#1534) * Fixed hardcoded string (#1532) * fixed spelling error that was bugging me :) - sep a rat e (#1535) Co-authored-by: Dave Lane <dave@oerfoundation.org> * Improve Server Rooms View (#1524) * Order rooms by status * Cleaned up order function * Now displays Started/Created/Ended * Added participant count to rooms list * Fix rake task user:create so that users can be created when terms are present (#1565) * Changed user create task to always accept terms * clean up * More secure room ID (#1451) * Legal and privpolicy link (#1421) * add customizable Links to Imprint and Privacy Policy * fix copy&paste error in spec * replace "imprint" with "legal" since that is the correct term * remove german translation of new strings, transifex will take care of them later * GRN2-295:Refactored update profile and update password (#1591) * Refactored update profile and update password * Relowered rubocop settings * Fixed email sending when not supposed to (#1592) * Design changes for small screens (#1580) * now rap for pagination * Update _subtitle.html.erb * Update _rooms.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update _users.html.erb * Update cant_create_rooms.html.erb * Update room.js * Update edit.html.erb * Update new.html.erb * Update cant_create_rooms.html.erb * Update _sessions.html.erb * Update _account.html.erb * Make Greenlight work with Ruby 2.7 (#1560) Greenlight's failure to start up with Ruby 2.7 seems to be caused by [an issue in bootsnap](https://github.com/Shopify/bootsnap/issues/258). Updating that library makes Greenlight work again. However, there are still a lot of deprecation warnings. But that's something to deal with separately. This fixes #1558 * use email input for sign in (#1199) * use email input for sign in * use email input for registration * use email input for invitation * use email input for account settings Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix Gemfile (#1593) * Fixed invalid token for password reset (#1632) * HELP_URL env variable now works as expected (#1636) * #1372 Fix for long Text in Table + Remove invalid HTML Tag (#1403) * removed invalid HTML Tag * removed invalid HTML Tag * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _server_recording_row.html.erb form-inline replaced by own css * Update _server_room_row.html.erb * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _public_recording_row.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update main.scss fix for long text * Update main.scss * Update _public_recording_row.html.erb * Added more validation on profile image (#1644) * Users who can't create rooms but have shared rooms now have a different view (#1649) * Revert "Puma Worker Configuration (#1332)" (#1667) This reverts commit 78ed8d74601b613af3fd96ccf75a6bada24deddd. * Removed html safe from all flash messages (#1668) * Remove hardcoded guest=true if require mod approval is set (#1669) * Change random generation for room uid (#1670) * GRN2-290: Update gems and update to Rails 5.2.4.3 (#1671) * Update gems and update to Rails 5.2.4.3 * remove gemfile error Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: Florian Weber <fnwbr@users.noreply.github.com> Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Lars Kiesow <lkiesow@uos.de> Co-authored-by: Dave Lane <dave@lane.net.nz> Co-authored-by: Dave Lane <dave@oerfoundation.org> Co-authored-by: Henning <hng@users.noreply.github.com> Co-authored-by: Marcel Waldvogel <marcel@waldvogel.family> Co-authored-by: Christian Marg <marg@rz.tu-clausthal.de> Co-authored-by: Klaus <klaus@jsxc.org>
2020-05-26 17:37:23 -04:00
context "POST #legal" do
it "changes the legal link on the page" do
allow(Rails.configuration).to receive(:loadbalanced_configuration).and_return(true)
allow_any_instance_of(User).to receive(:greenlight_account?).and_return(true)
@request.session[:user_id] = @admin.id
fake_url = "example.com"
Merge v2.7-alpha (#1951) * Fix wrong conditional (reported by LGTM) (#1477) Signed-off-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Bump rack from 2.2.2 to 2.2.3 (#1839) Bumps [rack](https://github.com/rack/rack) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v2.2.2...2.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [FIX] Unable to edit long recording names #1776 (#1780) * Allow to set a filter for LDAP authentication * [FIX] Unable to edit long recording names #1776 Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: farhatahmad <ahmad.af.farhat@gmail.com> * Desgin for Manage Users Tabs (#1777) * Update _subtitle.html.erb * Update _manage_users_tags.html.erb * Update admins.scss * Update _primary_themes.scss * Update _manage_users_tags.html.erb * Minor style changes to manage users (#1845) * Maintenance banner moved to admin site (#1775) * initial * finish * travis fixes * travis again * not required * Co-authored-by: Tobias Fiebig <t.fiebig@tudelft.nl> (#1296) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Enhance Room OpenGraph Metadata (#1601) * Revert "Enhance Room OpenGraph Metadata (#1601)" (#1852) This reverts commit 3b007c233ae12e0407f216ae269c63d6179f73b8. * GRN2-xx: Tab title now displays the current page name (#1853) * Tab title now displays the current page name * Added page title for the rest of the pages * Split Site Settings into 3 different tabs (#1858) * Split Site Settings into 3 different tabs * Fix copyright * Added redirect to correct tab * Make sure settings are displaying when they should * Update en.yml (#1857) * Build images for alpha branches (#1867) * Upgraded jquery to latest version (#1896) * Added favicon tag (#1898) * Fixed XSS issue with role name (#1899) * Update path for coloring redirect (#1908) * Added a fourth section to the room uid (#1910) * Fixed issue with insecure room sharing removal (#1914) * Fixes typo (#1917) Fixes typo: successfully was written incorrect. * Fixed order of rooms in server rooms (#1915) * Change default room sort to latest activity (#1919) * GRN2-xx: Small changes/improvements to the recording settings (#1851) * Small changes/improvements to the recording settings * Replaced room warning with info flash * Added global setting to enable/disable the recording consent feature * Replace Legal with Terms (#1931) * Added a more friendly OpenGraph description when invited to join a room (#1932) * Fixed issue causing maintenance banner not to hide correctly (#1933) * Hide recording menu and recording list when it is disabled (#1935) * Hide recording menu and recording list when it is disabled * Hide recording list when disabled * GRN2-xx: Added an auto-refresh after 2 mins while waiting for room to start (#1947) * Added an auto-refresh after 2 mins while waiting for room to start * Fixed random issue with test case * GRN2-xx: Added ability to preupload presentations to rooms (#1895) * Added ability to preupload presentations to rooms (#1868) * Added setting to site settings and allowed admins to change the presentation * Added AWS S3 and GCS Storage ENV variables * Added check to ensure file extension is correct * Added icon to remove presentation * Added testcases for preupload * Add nginx redirect to solve issue with relative root * Record title, instead of room name, in the popup (#1924) * Update _public_recording_row.html.erb * Update _recording_row.html.erb Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: beckerr-rzht <beckerr@hochschule-trier.de> Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: yanosz <yanosz@users.noreply.github.com> Co-authored-by: Moritz Schlarb <moschlar@metalabs.de> Co-authored-by: chronikum <34622984+chronikum@users.noreply.github.com> Co-authored-by: Mitsutaka Sato <miztaka@honestyworks.jp> Co-authored-by: hiroshisuga <45039819+hiroshisuga@users.noreply.github.com>
2020-07-29 11:03:22 -04:00
post :update_settings, params: { setting: "Legal URL", value: fake_url, tab: "administration" }
Merge v2.6-alpha (#1672) * GRN2-xx: Switch the relation between users and roles to make queries cleaner and faster (#1299) * First steps * Fixes in account creation flow * Fixed most testcases * more test fixes * Fixed more test cases * Passing tests and rubocop * Added rake task to remove rooms * Adding translation (#1510) * Update _account.html.erb * Update en.yml * Fix "for" attribute for label elements (#1488) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix some issues reported by LGTM (#1478) * Declare local JavaScript variables (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Remove unused local JavaScript variable (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Puma Worker Configuration (#1332) We noticed that the current default settings perform very poorly under load. We managed to literally take down Greenlight during a larger event when people where accessing the landing page for rooms and when doing some tests, I was more or less able to DoS Greenlight on my own. This patch adds a default worker configuration which significantly improves the situation. The small, 4 core machine I was testing on could handle about thrice the amount of requests. While the new default configuration should be reasonably well suited for most deployments, this patch further allows users to easily configure the worker pool on their own in the environment file. * Made name and email readonly for no greenlight accounts (#1534) * Fixed hardcoded string (#1532) * fixed spelling error that was bugging me :) - sep a rat e (#1535) Co-authored-by: Dave Lane <dave@oerfoundation.org> * Improve Server Rooms View (#1524) * Order rooms by status * Cleaned up order function * Now displays Started/Created/Ended * Added participant count to rooms list * Fix rake task user:create so that users can be created when terms are present (#1565) * Changed user create task to always accept terms * clean up * More secure room ID (#1451) * Legal and privpolicy link (#1421) * add customizable Links to Imprint and Privacy Policy * fix copy&paste error in spec * replace "imprint" with "legal" since that is the correct term * remove german translation of new strings, transifex will take care of them later * GRN2-295:Refactored update profile and update password (#1591) * Refactored update profile and update password * Relowered rubocop settings * Fixed email sending when not supposed to (#1592) * Design changes for small screens (#1580) * now rap for pagination * Update _subtitle.html.erb * Update _rooms.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update _users.html.erb * Update cant_create_rooms.html.erb * Update room.js * Update edit.html.erb * Update new.html.erb * Update cant_create_rooms.html.erb * Update _sessions.html.erb * Update _account.html.erb * Make Greenlight work with Ruby 2.7 (#1560) Greenlight's failure to start up with Ruby 2.7 seems to be caused by [an issue in bootsnap](https://github.com/Shopify/bootsnap/issues/258). Updating that library makes Greenlight work again. However, there are still a lot of deprecation warnings. But that's something to deal with separately. This fixes #1558 * use email input for sign in (#1199) * use email input for sign in * use email input for registration * use email input for invitation * use email input for account settings Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix Gemfile (#1593) * Fixed invalid token for password reset (#1632) * HELP_URL env variable now works as expected (#1636) * #1372 Fix for long Text in Table + Remove invalid HTML Tag (#1403) * removed invalid HTML Tag * removed invalid HTML Tag * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _server_recording_row.html.erb form-inline replaced by own css * Update _server_room_row.html.erb * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _public_recording_row.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update main.scss fix for long text * Update main.scss * Update _public_recording_row.html.erb * Added more validation on profile image (#1644) * Users who can't create rooms but have shared rooms now have a different view (#1649) * Revert "Puma Worker Configuration (#1332)" (#1667) This reverts commit 78ed8d74601b613af3fd96ccf75a6bada24deddd. * Removed html safe from all flash messages (#1668) * Remove hardcoded guest=true if require mod approval is set (#1669) * Change random generation for room uid (#1670) * GRN2-290: Update gems and update to Rails 5.2.4.3 (#1671) * Update gems and update to Rails 5.2.4.3 * remove gemfile error Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: Florian Weber <fnwbr@users.noreply.github.com> Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Lars Kiesow <lkiesow@uos.de> Co-authored-by: Dave Lane <dave@lane.net.nz> Co-authored-by: Dave Lane <dave@oerfoundation.org> Co-authored-by: Henning <hng@users.noreply.github.com> Co-authored-by: Marcel Waldvogel <marcel@waldvogel.family> Co-authored-by: Christian Marg <marg@rz.tu-clausthal.de> Co-authored-by: Klaus <klaus@jsxc.org>
2020-05-26 17:37:23 -04:00
feature = Setting.find_by(provider: "provider1").features.find_by(name: "Legal URL")
expect(feature[:value]).to eq(fake_url)
Merge v2.7-alpha (#1951) * Fix wrong conditional (reported by LGTM) (#1477) Signed-off-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Bump rack from 2.2.2 to 2.2.3 (#1839) Bumps [rack](https://github.com/rack/rack) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v2.2.2...2.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [FIX] Unable to edit long recording names #1776 (#1780) * Allow to set a filter for LDAP authentication * [FIX] Unable to edit long recording names #1776 Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: farhatahmad <ahmad.af.farhat@gmail.com> * Desgin for Manage Users Tabs (#1777) * Update _subtitle.html.erb * Update _manage_users_tags.html.erb * Update admins.scss * Update _primary_themes.scss * Update _manage_users_tags.html.erb * Minor style changes to manage users (#1845) * Maintenance banner moved to admin site (#1775) * initial * finish * travis fixes * travis again * not required * Co-authored-by: Tobias Fiebig <t.fiebig@tudelft.nl> (#1296) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Enhance Room OpenGraph Metadata (#1601) * Revert "Enhance Room OpenGraph Metadata (#1601)" (#1852) This reverts commit 3b007c233ae12e0407f216ae269c63d6179f73b8. * GRN2-xx: Tab title now displays the current page name (#1853) * Tab title now displays the current page name * Added page title for the rest of the pages * Split Site Settings into 3 different tabs (#1858) * Split Site Settings into 3 different tabs * Fix copyright * Added redirect to correct tab * Make sure settings are displaying when they should * Update en.yml (#1857) * Build images for alpha branches (#1867) * Upgraded jquery to latest version (#1896) * Added favicon tag (#1898) * Fixed XSS issue with role name (#1899) * Update path for coloring redirect (#1908) * Added a fourth section to the room uid (#1910) * Fixed issue with insecure room sharing removal (#1914) * Fixes typo (#1917) Fixes typo: successfully was written incorrect. * Fixed order of rooms in server rooms (#1915) * Change default room sort to latest activity (#1919) * GRN2-xx: Small changes/improvements to the recording settings (#1851) * Small changes/improvements to the recording settings * Replaced room warning with info flash * Added global setting to enable/disable the recording consent feature * Replace Legal with Terms (#1931) * Added a more friendly OpenGraph description when invited to join a room (#1932) * Fixed issue causing maintenance banner not to hide correctly (#1933) * Hide recording menu and recording list when it is disabled (#1935) * Hide recording menu and recording list when it is disabled * Hide recording list when disabled * GRN2-xx: Added an auto-refresh after 2 mins while waiting for room to start (#1947) * Added an auto-refresh after 2 mins while waiting for room to start * Fixed random issue with test case * GRN2-xx: Added ability to preupload presentations to rooms (#1895) * Added ability to preupload presentations to rooms (#1868) * Added setting to site settings and allowed admins to change the presentation * Added AWS S3 and GCS Storage ENV variables * Added check to ensure file extension is correct * Added icon to remove presentation * Added testcases for preupload * Add nginx redirect to solve issue with relative root * Record title, instead of room name, in the popup (#1924) * Update _public_recording_row.html.erb * Update _recording_row.html.erb Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: beckerr-rzht <beckerr@hochschule-trier.de> Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: yanosz <yanosz@users.noreply.github.com> Co-authored-by: Moritz Schlarb <moschlar@metalabs.de> Co-authored-by: chronikum <34622984+chronikum@users.noreply.github.com> Co-authored-by: Mitsutaka Sato <miztaka@honestyworks.jp> Co-authored-by: hiroshisuga <45039819+hiroshisuga@users.noreply.github.com>
2020-07-29 11:03:22 -04:00
expect(response).to redirect_to(admin_site_settings_path(tab: "administration"))
Merge v2.6-alpha (#1672) * GRN2-xx: Switch the relation between users and roles to make queries cleaner and faster (#1299) * First steps * Fixes in account creation flow * Fixed most testcases * more test fixes * Fixed more test cases * Passing tests and rubocop * Added rake task to remove rooms * Adding translation (#1510) * Update _account.html.erb * Update en.yml * Fix "for" attribute for label elements (#1488) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix some issues reported by LGTM (#1478) * Declare local JavaScript variables (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Remove unused local JavaScript variable (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Puma Worker Configuration (#1332) We noticed that the current default settings perform very poorly under load. We managed to literally take down Greenlight during a larger event when people where accessing the landing page for rooms and when doing some tests, I was more or less able to DoS Greenlight on my own. This patch adds a default worker configuration which significantly improves the situation. The small, 4 core machine I was testing on could handle about thrice the amount of requests. While the new default configuration should be reasonably well suited for most deployments, this patch further allows users to easily configure the worker pool on their own in the environment file. * Made name and email readonly for no greenlight accounts (#1534) * Fixed hardcoded string (#1532) * fixed spelling error that was bugging me :) - sep a rat e (#1535) Co-authored-by: Dave Lane <dave@oerfoundation.org> * Improve Server Rooms View (#1524) * Order rooms by status * Cleaned up order function * Now displays Started/Created/Ended * Added participant count to rooms list * Fix rake task user:create so that users can be created when terms are present (#1565) * Changed user create task to always accept terms * clean up * More secure room ID (#1451) * Legal and privpolicy link (#1421) * add customizable Links to Imprint and Privacy Policy * fix copy&paste error in spec * replace "imprint" with "legal" since that is the correct term * remove german translation of new strings, transifex will take care of them later * GRN2-295:Refactored update profile and update password (#1591) * Refactored update profile and update password * Relowered rubocop settings * Fixed email sending when not supposed to (#1592) * Design changes for small screens (#1580) * now rap for pagination * Update _subtitle.html.erb * Update _rooms.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update _users.html.erb * Update cant_create_rooms.html.erb * Update room.js * Update edit.html.erb * Update new.html.erb * Update cant_create_rooms.html.erb * Update _sessions.html.erb * Update _account.html.erb * Make Greenlight work with Ruby 2.7 (#1560) Greenlight's failure to start up with Ruby 2.7 seems to be caused by [an issue in bootsnap](https://github.com/Shopify/bootsnap/issues/258). Updating that library makes Greenlight work again. However, there are still a lot of deprecation warnings. But that's something to deal with separately. This fixes #1558 * use email input for sign in (#1199) * use email input for sign in * use email input for registration * use email input for invitation * use email input for account settings Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix Gemfile (#1593) * Fixed invalid token for password reset (#1632) * HELP_URL env variable now works as expected (#1636) * #1372 Fix for long Text in Table + Remove invalid HTML Tag (#1403) * removed invalid HTML Tag * removed invalid HTML Tag * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _server_recording_row.html.erb form-inline replaced by own css * Update _server_room_row.html.erb * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _public_recording_row.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update main.scss fix for long text * Update main.scss * Update _public_recording_row.html.erb * Added more validation on profile image (#1644) * Users who can't create rooms but have shared rooms now have a different view (#1649) * Revert "Puma Worker Configuration (#1332)" (#1667) This reverts commit 78ed8d74601b613af3fd96ccf75a6bada24deddd. * Removed html safe from all flash messages (#1668) * Remove hardcoded guest=true if require mod approval is set (#1669) * Change random generation for room uid (#1670) * GRN2-290: Update gems and update to Rails 5.2.4.3 (#1671) * Update gems and update to Rails 5.2.4.3 * remove gemfile error Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: Florian Weber <fnwbr@users.noreply.github.com> Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Lars Kiesow <lkiesow@uos.de> Co-authored-by: Dave Lane <dave@lane.net.nz> Co-authored-by: Dave Lane <dave@oerfoundation.org> Co-authored-by: Henning <hng@users.noreply.github.com> Co-authored-by: Marcel Waldvogel <marcel@waldvogel.family> Co-authored-by: Christian Marg <marg@rz.tu-clausthal.de> Co-authored-by: Klaus <klaus@jsxc.org>
2020-05-26 17:37:23 -04:00
end
end
context "POST #privpolicy" do
it "changes the privacy policy on the page" do
allow(Rails.configuration).to receive(:loadbalanced_configuration).and_return(true)
allow_any_instance_of(User).to receive(:greenlight_account?).and_return(true)
@request.session[:user_id] = @admin.id
fake_url = "example.com"
Merge v2.7-alpha (#1951) * Fix wrong conditional (reported by LGTM) (#1477) Signed-off-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Bump rack from 2.2.2 to 2.2.3 (#1839) Bumps [rack](https://github.com/rack/rack) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v2.2.2...2.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [FIX] Unable to edit long recording names #1776 (#1780) * Allow to set a filter for LDAP authentication * [FIX] Unable to edit long recording names #1776 Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: farhatahmad <ahmad.af.farhat@gmail.com> * Desgin for Manage Users Tabs (#1777) * Update _subtitle.html.erb * Update _manage_users_tags.html.erb * Update admins.scss * Update _primary_themes.scss * Update _manage_users_tags.html.erb * Minor style changes to manage users (#1845) * Maintenance banner moved to admin site (#1775) * initial * finish * travis fixes * travis again * not required * Co-authored-by: Tobias Fiebig <t.fiebig@tudelft.nl> (#1296) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Enhance Room OpenGraph Metadata (#1601) * Revert "Enhance Room OpenGraph Metadata (#1601)" (#1852) This reverts commit 3b007c233ae12e0407f216ae269c63d6179f73b8. * GRN2-xx: Tab title now displays the current page name (#1853) * Tab title now displays the current page name * Added page title for the rest of the pages * Split Site Settings into 3 different tabs (#1858) * Split Site Settings into 3 different tabs * Fix copyright * Added redirect to correct tab * Make sure settings are displaying when they should * Update en.yml (#1857) * Build images for alpha branches (#1867) * Upgraded jquery to latest version (#1896) * Added favicon tag (#1898) * Fixed XSS issue with role name (#1899) * Update path for coloring redirect (#1908) * Added a fourth section to the room uid (#1910) * Fixed issue with insecure room sharing removal (#1914) * Fixes typo (#1917) Fixes typo: successfully was written incorrect. * Fixed order of rooms in server rooms (#1915) * Change default room sort to latest activity (#1919) * GRN2-xx: Small changes/improvements to the recording settings (#1851) * Small changes/improvements to the recording settings * Replaced room warning with info flash * Added global setting to enable/disable the recording consent feature * Replace Legal with Terms (#1931) * Added a more friendly OpenGraph description when invited to join a room (#1932) * Fixed issue causing maintenance banner not to hide correctly (#1933) * Hide recording menu and recording list when it is disabled (#1935) * Hide recording menu and recording list when it is disabled * Hide recording list when disabled * GRN2-xx: Added an auto-refresh after 2 mins while waiting for room to start (#1947) * Added an auto-refresh after 2 mins while waiting for room to start * Fixed random issue with test case * GRN2-xx: Added ability to preupload presentations to rooms (#1895) * Added ability to preupload presentations to rooms (#1868) * Added setting to site settings and allowed admins to change the presentation * Added AWS S3 and GCS Storage ENV variables * Added check to ensure file extension is correct * Added icon to remove presentation * Added testcases for preupload * Add nginx redirect to solve issue with relative root * Record title, instead of room name, in the popup (#1924) * Update _public_recording_row.html.erb * Update _recording_row.html.erb Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: beckerr-rzht <beckerr@hochschule-trier.de> Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: yanosz <yanosz@users.noreply.github.com> Co-authored-by: Moritz Schlarb <moschlar@metalabs.de> Co-authored-by: chronikum <34622984+chronikum@users.noreply.github.com> Co-authored-by: Mitsutaka Sato <miztaka@honestyworks.jp> Co-authored-by: hiroshisuga <45039819+hiroshisuga@users.noreply.github.com>
2020-07-29 11:03:22 -04:00
post :update_settings, params: { setting: "Privacy Policy URL", value: fake_url, tab: "administration" }
Merge v2.6-alpha (#1672) * GRN2-xx: Switch the relation between users and roles to make queries cleaner and faster (#1299) * First steps * Fixes in account creation flow * Fixed most testcases * more test fixes * Fixed more test cases * Passing tests and rubocop * Added rake task to remove rooms * Adding translation (#1510) * Update _account.html.erb * Update en.yml * Fix "for" attribute for label elements (#1488) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix some issues reported by LGTM (#1478) * Declare local JavaScript variables (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Remove unused local JavaScript variable (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Puma Worker Configuration (#1332) We noticed that the current default settings perform very poorly under load. We managed to literally take down Greenlight during a larger event when people where accessing the landing page for rooms and when doing some tests, I was more or less able to DoS Greenlight on my own. This patch adds a default worker configuration which significantly improves the situation. The small, 4 core machine I was testing on could handle about thrice the amount of requests. While the new default configuration should be reasonably well suited for most deployments, this patch further allows users to easily configure the worker pool on their own in the environment file. * Made name and email readonly for no greenlight accounts (#1534) * Fixed hardcoded string (#1532) * fixed spelling error that was bugging me :) - sep a rat e (#1535) Co-authored-by: Dave Lane <dave@oerfoundation.org> * Improve Server Rooms View (#1524) * Order rooms by status * Cleaned up order function * Now displays Started/Created/Ended * Added participant count to rooms list * Fix rake task user:create so that users can be created when terms are present (#1565) * Changed user create task to always accept terms * clean up * More secure room ID (#1451) * Legal and privpolicy link (#1421) * add customizable Links to Imprint and Privacy Policy * fix copy&paste error in spec * replace "imprint" with "legal" since that is the correct term * remove german translation of new strings, transifex will take care of them later * GRN2-295:Refactored update profile and update password (#1591) * Refactored update profile and update password * Relowered rubocop settings * Fixed email sending when not supposed to (#1592) * Design changes for small screens (#1580) * now rap for pagination * Update _subtitle.html.erb * Update _rooms.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update _users.html.erb * Update cant_create_rooms.html.erb * Update room.js * Update edit.html.erb * Update new.html.erb * Update cant_create_rooms.html.erb * Update _sessions.html.erb * Update _account.html.erb * Make Greenlight work with Ruby 2.7 (#1560) Greenlight's failure to start up with Ruby 2.7 seems to be caused by [an issue in bootsnap](https://github.com/Shopify/bootsnap/issues/258). Updating that library makes Greenlight work again. However, there are still a lot of deprecation warnings. But that's something to deal with separately. This fixes #1558 * use email input for sign in (#1199) * use email input for sign in * use email input for registration * use email input for invitation * use email input for account settings Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix Gemfile (#1593) * Fixed invalid token for password reset (#1632) * HELP_URL env variable now works as expected (#1636) * #1372 Fix for long Text in Table + Remove invalid HTML Tag (#1403) * removed invalid HTML Tag * removed invalid HTML Tag * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _server_recording_row.html.erb form-inline replaced by own css * Update _server_room_row.html.erb * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _public_recording_row.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update main.scss fix for long text * Update main.scss * Update _public_recording_row.html.erb * Added more validation on profile image (#1644) * Users who can't create rooms but have shared rooms now have a different view (#1649) * Revert "Puma Worker Configuration (#1332)" (#1667) This reverts commit 78ed8d74601b613af3fd96ccf75a6bada24deddd. * Removed html safe from all flash messages (#1668) * Remove hardcoded guest=true if require mod approval is set (#1669) * Change random generation for room uid (#1670) * GRN2-290: Update gems and update to Rails 5.2.4.3 (#1671) * Update gems and update to Rails 5.2.4.3 * remove gemfile error Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: Florian Weber <fnwbr@users.noreply.github.com> Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Lars Kiesow <lkiesow@uos.de> Co-authored-by: Dave Lane <dave@lane.net.nz> Co-authored-by: Dave Lane <dave@oerfoundation.org> Co-authored-by: Henning <hng@users.noreply.github.com> Co-authored-by: Marcel Waldvogel <marcel@waldvogel.family> Co-authored-by: Christian Marg <marg@rz.tu-clausthal.de> Co-authored-by: Klaus <klaus@jsxc.org>
2020-05-26 17:37:23 -04:00
feature = Setting.find_by(provider: "provider1").features.find_by(name: "Privacy Policy URL")
expect(feature[:value]).to eq(fake_url)
Merge v2.7-alpha (#1951) * Fix wrong conditional (reported by LGTM) (#1477) Signed-off-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Bump rack from 2.2.2 to 2.2.3 (#1839) Bumps [rack](https://github.com/rack/rack) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v2.2.2...2.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [FIX] Unable to edit long recording names #1776 (#1780) * Allow to set a filter for LDAP authentication * [FIX] Unable to edit long recording names #1776 Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: farhatahmad <ahmad.af.farhat@gmail.com> * Desgin for Manage Users Tabs (#1777) * Update _subtitle.html.erb * Update _manage_users_tags.html.erb * Update admins.scss * Update _primary_themes.scss * Update _manage_users_tags.html.erb * Minor style changes to manage users (#1845) * Maintenance banner moved to admin site (#1775) * initial * finish * travis fixes * travis again * not required * Co-authored-by: Tobias Fiebig <t.fiebig@tudelft.nl> (#1296) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Enhance Room OpenGraph Metadata (#1601) * Revert "Enhance Room OpenGraph Metadata (#1601)" (#1852) This reverts commit 3b007c233ae12e0407f216ae269c63d6179f73b8. * GRN2-xx: Tab title now displays the current page name (#1853) * Tab title now displays the current page name * Added page title for the rest of the pages * Split Site Settings into 3 different tabs (#1858) * Split Site Settings into 3 different tabs * Fix copyright * Added redirect to correct tab * Make sure settings are displaying when they should * Update en.yml (#1857) * Build images for alpha branches (#1867) * Upgraded jquery to latest version (#1896) * Added favicon tag (#1898) * Fixed XSS issue with role name (#1899) * Update path for coloring redirect (#1908) * Added a fourth section to the room uid (#1910) * Fixed issue with insecure room sharing removal (#1914) * Fixes typo (#1917) Fixes typo: successfully was written incorrect. * Fixed order of rooms in server rooms (#1915) * Change default room sort to latest activity (#1919) * GRN2-xx: Small changes/improvements to the recording settings (#1851) * Small changes/improvements to the recording settings * Replaced room warning with info flash * Added global setting to enable/disable the recording consent feature * Replace Legal with Terms (#1931) * Added a more friendly OpenGraph description when invited to join a room (#1932) * Fixed issue causing maintenance banner not to hide correctly (#1933) * Hide recording menu and recording list when it is disabled (#1935) * Hide recording menu and recording list when it is disabled * Hide recording list when disabled * GRN2-xx: Added an auto-refresh after 2 mins while waiting for room to start (#1947) * Added an auto-refresh after 2 mins while waiting for room to start * Fixed random issue with test case * GRN2-xx: Added ability to preupload presentations to rooms (#1895) * Added ability to preupload presentations to rooms (#1868) * Added setting to site settings and allowed admins to change the presentation * Added AWS S3 and GCS Storage ENV variables * Added check to ensure file extension is correct * Added icon to remove presentation * Added testcases for preupload * Add nginx redirect to solve issue with relative root * Record title, instead of room name, in the popup (#1924) * Update _public_recording_row.html.erb * Update _recording_row.html.erb Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: beckerr-rzht <beckerr@hochschule-trier.de> Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: yanosz <yanosz@users.noreply.github.com> Co-authored-by: Moritz Schlarb <moschlar@metalabs.de> Co-authored-by: chronikum <34622984+chronikum@users.noreply.github.com> Co-authored-by: Mitsutaka Sato <miztaka@honestyworks.jp> Co-authored-by: hiroshisuga <45039819+hiroshisuga@users.noreply.github.com>
2020-07-29 11:03:22 -04:00
expect(response).to redirect_to(admin_site_settings_path(tab: "administration"))
Merge v2.6-alpha (#1672) * GRN2-xx: Switch the relation between users and roles to make queries cleaner and faster (#1299) * First steps * Fixes in account creation flow * Fixed most testcases * more test fixes * Fixed more test cases * Passing tests and rubocop * Added rake task to remove rooms * Adding translation (#1510) * Update _account.html.erb * Update en.yml * Fix "for" attribute for label elements (#1488) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix some issues reported by LGTM (#1478) * Declare local JavaScript variables (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Remove unused local JavaScript variable (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Puma Worker Configuration (#1332) We noticed that the current default settings perform very poorly under load. We managed to literally take down Greenlight during a larger event when people where accessing the landing page for rooms and when doing some tests, I was more or less able to DoS Greenlight on my own. This patch adds a default worker configuration which significantly improves the situation. The small, 4 core machine I was testing on could handle about thrice the amount of requests. While the new default configuration should be reasonably well suited for most deployments, this patch further allows users to easily configure the worker pool on their own in the environment file. * Made name and email readonly for no greenlight accounts (#1534) * Fixed hardcoded string (#1532) * fixed spelling error that was bugging me :) - sep a rat e (#1535) Co-authored-by: Dave Lane <dave@oerfoundation.org> * Improve Server Rooms View (#1524) * Order rooms by status * Cleaned up order function * Now displays Started/Created/Ended * Added participant count to rooms list * Fix rake task user:create so that users can be created when terms are present (#1565) * Changed user create task to always accept terms * clean up * More secure room ID (#1451) * Legal and privpolicy link (#1421) * add customizable Links to Imprint and Privacy Policy * fix copy&paste error in spec * replace "imprint" with "legal" since that is the correct term * remove german translation of new strings, transifex will take care of them later * GRN2-295:Refactored update profile and update password (#1591) * Refactored update profile and update password * Relowered rubocop settings * Fixed email sending when not supposed to (#1592) * Design changes for small screens (#1580) * now rap for pagination * Update _subtitle.html.erb * Update _rooms.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update _users.html.erb * Update cant_create_rooms.html.erb * Update room.js * Update edit.html.erb * Update new.html.erb * Update cant_create_rooms.html.erb * Update _sessions.html.erb * Update _account.html.erb * Make Greenlight work with Ruby 2.7 (#1560) Greenlight's failure to start up with Ruby 2.7 seems to be caused by [an issue in bootsnap](https://github.com/Shopify/bootsnap/issues/258). Updating that library makes Greenlight work again. However, there are still a lot of deprecation warnings. But that's something to deal with separately. This fixes #1558 * use email input for sign in (#1199) * use email input for sign in * use email input for registration * use email input for invitation * use email input for account settings Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix Gemfile (#1593) * Fixed invalid token for password reset (#1632) * HELP_URL env variable now works as expected (#1636) * #1372 Fix for long Text in Table + Remove invalid HTML Tag (#1403) * removed invalid HTML Tag * removed invalid HTML Tag * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _server_recording_row.html.erb form-inline replaced by own css * Update _server_room_row.html.erb * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _public_recording_row.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update main.scss fix for long text * Update main.scss * Update _public_recording_row.html.erb * Added more validation on profile image (#1644) * Users who can't create rooms but have shared rooms now have a different view (#1649) * Revert "Puma Worker Configuration (#1332)" (#1667) This reverts commit 78ed8d74601b613af3fd96ccf75a6bada24deddd. * Removed html safe from all flash messages (#1668) * Remove hardcoded guest=true if require mod approval is set (#1669) * Change random generation for room uid (#1670) * GRN2-290: Update gems and update to Rails 5.2.4.3 (#1671) * Update gems and update to Rails 5.2.4.3 * remove gemfile error Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: Florian Weber <fnwbr@users.noreply.github.com> Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Lars Kiesow <lkiesow@uos.de> Co-authored-by: Dave Lane <dave@lane.net.nz> Co-authored-by: Dave Lane <dave@oerfoundation.org> Co-authored-by: Henning <hng@users.noreply.github.com> Co-authored-by: Marcel Waldvogel <marcel@waldvogel.family> Co-authored-by: Christian Marg <marg@rz.tu-clausthal.de> Co-authored-by: Klaus <klaus@jsxc.org>
2020-05-26 17:37:23 -04:00
end
end
Admin panel (#496) * Added the administrator role and functionality that comes with it (#403) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * Update user.rb * Update admins.js * GRN-15: Added the ability to change color and image from admin interface (#425) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Update user.rb * Update user.rb * Update routes.rb * Update admins_controller.rb * GRN-87:Added a super admin role and made changes to how to the design works (#430) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * Update user.rb * Update themes_controller_spec.rb * Update routes.rb * Update admins_controller.rb * Removed duplicated code that broke the build after last merge * GRN-78: Restructured some of the views to make the UI more consistent and responsive (#435) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * GRN-78: Cleaned up buttons and moved signin to its own page * GRN-78: Moved the Rooms and Recordings link to nav bar * Merge fix * Views restructure fix (#458) * Added cache to gitlab-ci.yml * Restructured seed * GRN2-99 -> GRN2-106: UI cleanup and refactoring (#478) * GRN2-98: Change Fullname to Full name * GRN2-105: Changed View Users to Manage Users * GRN2-101/103: Updated email to match branding * GRN2-100: Updated Email Sent flash to be more descriptive * GRN2-104: Redirect user to sign in page w/ flash after clicking activation link * GRN2-102: Changed the wording in the verification email * GRN2-99: Added email form validation * GRN2-106: Cleaned up Users list front end * Fixes to rake and admin password validator for passing rubocop * GRN2-113: Fixed issues with admin panel (#479) * GRN2-116: Code clean up after restructure of views (#482) * Removed unused references * Rubocop * Added pagination to admin view (#483) * GRN2-114: Added the ability for admins to ban/unban users (#487) * Added the ability for admins to ban and unban users * Update sessions_helper.rb * Merge branch 'master' into admin-panel (#492) * Updated rubocop gem * Updated rubocop and fixed issues (#490) * Rubocop fixes * GRN2-122: Updated sign in flow for admins and switch design tab to site settings (#489) * Switched design tab to site settings * Update _header with spaces instead of tabs * Added more test cases to increase coverage (#494)
2019-05-03 13:05:12 -04:00
context "POST #coloring" do
it "changes the primary on the page" do
allow(Rails.configuration).to receive(:loadbalanced_configuration).and_return(true)
allow_any_instance_of(User).to receive(:greenlight_account?).and_return(true)
@request.session[:user_id] = @admin.id
primary_color = Faker::Color.hex_color
Admin panel (#496) * Added the administrator role and functionality that comes with it (#403) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * Update user.rb * Update admins.js * GRN-15: Added the ability to change color and image from admin interface (#425) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Update user.rb * Update user.rb * Update routes.rb * Update admins_controller.rb * GRN-87:Added a super admin role and made changes to how to the design works (#430) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * Update user.rb * Update themes_controller_spec.rb * Update routes.rb * Update admins_controller.rb * Removed duplicated code that broke the build after last merge * GRN-78: Restructured some of the views to make the UI more consistent and responsive (#435) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * GRN-78: Cleaned up buttons and moved signin to its own page * GRN-78: Moved the Rooms and Recordings link to nav bar * Merge fix * Views restructure fix (#458) * Added cache to gitlab-ci.yml * Restructured seed * GRN2-99 -> GRN2-106: UI cleanup and refactoring (#478) * GRN2-98: Change Fullname to Full name * GRN2-105: Changed View Users to Manage Users * GRN2-101/103: Updated email to match branding * GRN2-100: Updated Email Sent flash to be more descriptive * GRN2-104: Redirect user to sign in page w/ flash after clicking activation link * GRN2-102: Changed the wording in the verification email * GRN2-99: Added email form validation * GRN2-106: Cleaned up Users list front end * Fixes to rake and admin password validator for passing rubocop * GRN2-113: Fixed issues with admin panel (#479) * GRN2-116: Code clean up after restructure of views (#482) * Removed unused references * Rubocop * Added pagination to admin view (#483) * GRN2-114: Added the ability for admins to ban/unban users (#487) * Added the ability for admins to ban and unban users * Update sessions_helper.rb * Merge branch 'master' into admin-panel (#492) * Updated rubocop gem * Updated rubocop and fixed issues (#490) * Rubocop fixes * GRN2-122: Updated sign in flow for admins and switch design tab to site settings (#489) * Switched design tab to site settings * Update _header with spaces instead of tabs * Added more test cases to increase coverage (#494)
2019-05-03 13:05:12 -04:00
post :coloring, params: { value: primary_color }
Admin panel (#496) * Added the administrator role and functionality that comes with it (#403) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * Update user.rb * Update admins.js * GRN-15: Added the ability to change color and image from admin interface (#425) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Update user.rb * Update user.rb * Update routes.rb * Update admins_controller.rb * GRN-87:Added a super admin role and made changes to how to the design works (#430) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * Update user.rb * Update themes_controller_spec.rb * Update routes.rb * Update admins_controller.rb * Removed duplicated code that broke the build after last merge * GRN-78: Restructured some of the views to make the UI more consistent and responsive (#435) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * GRN-78: Cleaned up buttons and moved signin to its own page * GRN-78: Moved the Rooms and Recordings link to nav bar * Merge fix * Views restructure fix (#458) * Added cache to gitlab-ci.yml * Restructured seed * GRN2-99 -> GRN2-106: UI cleanup and refactoring (#478) * GRN2-98: Change Fullname to Full name * GRN2-105: Changed View Users to Manage Users * GRN2-101/103: Updated email to match branding * GRN2-100: Updated Email Sent flash to be more descriptive * GRN2-104: Redirect user to sign in page w/ flash after clicking activation link * GRN2-102: Changed the wording in the verification email * GRN2-99: Added email form validation * GRN2-106: Cleaned up Users list front end * Fixes to rake and admin password validator for passing rubocop * GRN2-113: Fixed issues with admin panel (#479) * GRN2-116: Code clean up after restructure of views (#482) * Removed unused references * Rubocop * Added pagination to admin view (#483) * GRN2-114: Added the ability for admins to ban/unban users (#487) * Added the ability for admins to ban and unban users * Update sessions_helper.rb * Merge branch 'master' into admin-panel (#492) * Updated rubocop gem * Updated rubocop and fixed issues (#490) * Rubocop fixes * GRN2-122: Updated sign in flow for admins and switch design tab to site settings (#489) * Switched design tab to site settings * Update _header with spaces instead of tabs * Added more test cases to increase coverage (#494)
2019-05-03 13:05:12 -04:00
feature = Setting.find_by(provider: "provider1").features.find_by(name: "Primary Color")
expect(feature[:value]).to eq(primary_color)
Merge v2.7-alpha (#1951) * Fix wrong conditional (reported by LGTM) (#1477) Signed-off-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Bump rack from 2.2.2 to 2.2.3 (#1839) Bumps [rack](https://github.com/rack/rack) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v2.2.2...2.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [FIX] Unable to edit long recording names #1776 (#1780) * Allow to set a filter for LDAP authentication * [FIX] Unable to edit long recording names #1776 Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: farhatahmad <ahmad.af.farhat@gmail.com> * Desgin for Manage Users Tabs (#1777) * Update _subtitle.html.erb * Update _manage_users_tags.html.erb * Update admins.scss * Update _primary_themes.scss * Update _manage_users_tags.html.erb * Minor style changes to manage users (#1845) * Maintenance banner moved to admin site (#1775) * initial * finish * travis fixes * travis again * not required * Co-authored-by: Tobias Fiebig <t.fiebig@tudelft.nl> (#1296) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Enhance Room OpenGraph Metadata (#1601) * Revert "Enhance Room OpenGraph Metadata (#1601)" (#1852) This reverts commit 3b007c233ae12e0407f216ae269c63d6179f73b8. * GRN2-xx: Tab title now displays the current page name (#1853) * Tab title now displays the current page name * Added page title for the rest of the pages * Split Site Settings into 3 different tabs (#1858) * Split Site Settings into 3 different tabs * Fix copyright * Added redirect to correct tab * Make sure settings are displaying when they should * Update en.yml (#1857) * Build images for alpha branches (#1867) * Upgraded jquery to latest version (#1896) * Added favicon tag (#1898) * Fixed XSS issue with role name (#1899) * Update path for coloring redirect (#1908) * Added a fourth section to the room uid (#1910) * Fixed issue with insecure room sharing removal (#1914) * Fixes typo (#1917) Fixes typo: successfully was written incorrect. * Fixed order of rooms in server rooms (#1915) * Change default room sort to latest activity (#1919) * GRN2-xx: Small changes/improvements to the recording settings (#1851) * Small changes/improvements to the recording settings * Replaced room warning with info flash * Added global setting to enable/disable the recording consent feature * Replace Legal with Terms (#1931) * Added a more friendly OpenGraph description when invited to join a room (#1932) * Fixed issue causing maintenance banner not to hide correctly (#1933) * Hide recording menu and recording list when it is disabled (#1935) * Hide recording menu and recording list when it is disabled * Hide recording list when disabled * GRN2-xx: Added an auto-refresh after 2 mins while waiting for room to start (#1947) * Added an auto-refresh after 2 mins while waiting for room to start * Fixed random issue with test case * GRN2-xx: Added ability to preupload presentations to rooms (#1895) * Added ability to preupload presentations to rooms (#1868) * Added setting to site settings and allowed admins to change the presentation * Added AWS S3 and GCS Storage ENV variables * Added check to ensure file extension is correct * Added icon to remove presentation * Added testcases for preupload * Add nginx redirect to solve issue with relative root * Record title, instead of room name, in the popup (#1924) * Update _public_recording_row.html.erb * Update _recording_row.html.erb Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: beckerr-rzht <beckerr@hochschule-trier.de> Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: yanosz <yanosz@users.noreply.github.com> Co-authored-by: Moritz Schlarb <moschlar@metalabs.de> Co-authored-by: chronikum <34622984+chronikum@users.noreply.github.com> Co-authored-by: Mitsutaka Sato <miztaka@honestyworks.jp> Co-authored-by: hiroshisuga <45039819+hiroshisuga@users.noreply.github.com>
2020-07-29 11:03:22 -04:00
expect(response).to redirect_to(admin_site_settings_path(tab: "appearance"))
end
it "changes the primary-lighten on the page" do
allow(Rails.configuration).to receive(:loadbalanced_configuration).and_return(true)
allow_any_instance_of(User).to receive(:greenlight_account?).and_return(true)
@request.session[:user_id] = @admin.id
primary_color = Faker::Color.hex_color
Merge v2.7-alpha (#1951) * Fix wrong conditional (reported by LGTM) (#1477) Signed-off-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Bump rack from 2.2.2 to 2.2.3 (#1839) Bumps [rack](https://github.com/rack/rack) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v2.2.2...2.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [FIX] Unable to edit long recording names #1776 (#1780) * Allow to set a filter for LDAP authentication * [FIX] Unable to edit long recording names #1776 Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: farhatahmad <ahmad.af.farhat@gmail.com> * Desgin for Manage Users Tabs (#1777) * Update _subtitle.html.erb * Update _manage_users_tags.html.erb * Update admins.scss * Update _primary_themes.scss * Update _manage_users_tags.html.erb * Minor style changes to manage users (#1845) * Maintenance banner moved to admin site (#1775) * initial * finish * travis fixes * travis again * not required * Co-authored-by: Tobias Fiebig <t.fiebig@tudelft.nl> (#1296) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Enhance Room OpenGraph Metadata (#1601) * Revert "Enhance Room OpenGraph Metadata (#1601)" (#1852) This reverts commit 3b007c233ae12e0407f216ae269c63d6179f73b8. * GRN2-xx: Tab title now displays the current page name (#1853) * Tab title now displays the current page name * Added page title for the rest of the pages * Split Site Settings into 3 different tabs (#1858) * Split Site Settings into 3 different tabs * Fix copyright * Added redirect to correct tab * Make sure settings are displaying when they should * Update en.yml (#1857) * Build images for alpha branches (#1867) * Upgraded jquery to latest version (#1896) * Added favicon tag (#1898) * Fixed XSS issue with role name (#1899) * Update path for coloring redirect (#1908) * Added a fourth section to the room uid (#1910) * Fixed issue with insecure room sharing removal (#1914) * Fixes typo (#1917) Fixes typo: successfully was written incorrect. * Fixed order of rooms in server rooms (#1915) * Change default room sort to latest activity (#1919) * GRN2-xx: Small changes/improvements to the recording settings (#1851) * Small changes/improvements to the recording settings * Replaced room warning with info flash * Added global setting to enable/disable the recording consent feature * Replace Legal with Terms (#1931) * Added a more friendly OpenGraph description when invited to join a room (#1932) * Fixed issue causing maintenance banner not to hide correctly (#1933) * Hide recording menu and recording list when it is disabled (#1935) * Hide recording menu and recording list when it is disabled * Hide recording list when disabled * GRN2-xx: Added an auto-refresh after 2 mins while waiting for room to start (#1947) * Added an auto-refresh after 2 mins while waiting for room to start * Fixed random issue with test case * GRN2-xx: Added ability to preupload presentations to rooms (#1895) * Added ability to preupload presentations to rooms (#1868) * Added setting to site settings and allowed admins to change the presentation * Added AWS S3 and GCS Storage ENV variables * Added check to ensure file extension is correct * Added icon to remove presentation * Added testcases for preupload * Add nginx redirect to solve issue with relative root * Record title, instead of room name, in the popup (#1924) * Update _public_recording_row.html.erb * Update _recording_row.html.erb Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: beckerr-rzht <beckerr@hochschule-trier.de> Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: yanosz <yanosz@users.noreply.github.com> Co-authored-by: Moritz Schlarb <moschlar@metalabs.de> Co-authored-by: chronikum <34622984+chronikum@users.noreply.github.com> Co-authored-by: Mitsutaka Sato <miztaka@honestyworks.jp> Co-authored-by: hiroshisuga <45039819+hiroshisuga@users.noreply.github.com>
2020-07-29 11:03:22 -04:00
post :update_settings, params: { setting: "Primary Color Lighten", value: primary_color, tab: "appearance" }
feature = Setting.find_by(provider: "provider1").features.find_by(name: "Primary Color Lighten")
expect(feature[:value]).to eq(primary_color)
Merge v2.7-alpha (#1951) * Fix wrong conditional (reported by LGTM) (#1477) Signed-off-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Bump rack from 2.2.2 to 2.2.3 (#1839) Bumps [rack](https://github.com/rack/rack) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v2.2.2...2.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [FIX] Unable to edit long recording names #1776 (#1780) * Allow to set a filter for LDAP authentication * [FIX] Unable to edit long recording names #1776 Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: farhatahmad <ahmad.af.farhat@gmail.com> * Desgin for Manage Users Tabs (#1777) * Update _subtitle.html.erb * Update _manage_users_tags.html.erb * Update admins.scss * Update _primary_themes.scss * Update _manage_users_tags.html.erb * Minor style changes to manage users (#1845) * Maintenance banner moved to admin site (#1775) * initial * finish * travis fixes * travis again * not required * Co-authored-by: Tobias Fiebig <t.fiebig@tudelft.nl> (#1296) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Enhance Room OpenGraph Metadata (#1601) * Revert "Enhance Room OpenGraph Metadata (#1601)" (#1852) This reverts commit 3b007c233ae12e0407f216ae269c63d6179f73b8. * GRN2-xx: Tab title now displays the current page name (#1853) * Tab title now displays the current page name * Added page title for the rest of the pages * Split Site Settings into 3 different tabs (#1858) * Split Site Settings into 3 different tabs * Fix copyright * Added redirect to correct tab * Make sure settings are displaying when they should * Update en.yml (#1857) * Build images for alpha branches (#1867) * Upgraded jquery to latest version (#1896) * Added favicon tag (#1898) * Fixed XSS issue with role name (#1899) * Update path for coloring redirect (#1908) * Added a fourth section to the room uid (#1910) * Fixed issue with insecure room sharing removal (#1914) * Fixes typo (#1917) Fixes typo: successfully was written incorrect. * Fixed order of rooms in server rooms (#1915) * Change default room sort to latest activity (#1919) * GRN2-xx: Small changes/improvements to the recording settings (#1851) * Small changes/improvements to the recording settings * Replaced room warning with info flash * Added global setting to enable/disable the recording consent feature * Replace Legal with Terms (#1931) * Added a more friendly OpenGraph description when invited to join a room (#1932) * Fixed issue causing maintenance banner not to hide correctly (#1933) * Hide recording menu and recording list when it is disabled (#1935) * Hide recording menu and recording list when it is disabled * Hide recording list when disabled * GRN2-xx: Added an auto-refresh after 2 mins while waiting for room to start (#1947) * Added an auto-refresh after 2 mins while waiting for room to start * Fixed random issue with test case * GRN2-xx: Added ability to preupload presentations to rooms (#1895) * Added ability to preupload presentations to rooms (#1868) * Added setting to site settings and allowed admins to change the presentation * Added AWS S3 and GCS Storage ENV variables * Added check to ensure file extension is correct * Added icon to remove presentation * Added testcases for preupload * Add nginx redirect to solve issue with relative root * Record title, instead of room name, in the popup (#1924) * Update _public_recording_row.html.erb * Update _recording_row.html.erb Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: beckerr-rzht <beckerr@hochschule-trier.de> Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: yanosz <yanosz@users.noreply.github.com> Co-authored-by: Moritz Schlarb <moschlar@metalabs.de> Co-authored-by: chronikum <34622984+chronikum@users.noreply.github.com> Co-authored-by: Mitsutaka Sato <miztaka@honestyworks.jp> Co-authored-by: hiroshisuga <45039819+hiroshisuga@users.noreply.github.com>
2020-07-29 11:03:22 -04:00
expect(response).to redirect_to(admin_site_settings_path(tab: "appearance"))
end
it "changes the primary-darken on the page" do
allow(Rails.configuration).to receive(:loadbalanced_configuration).and_return(true)
allow_any_instance_of(User).to receive(:greenlight_account?).and_return(true)
@request.session[:user_id] = @admin.id
primary_color = Faker::Color.hex_color
Merge v2.7-alpha (#1951) * Fix wrong conditional (reported by LGTM) (#1477) Signed-off-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Bump rack from 2.2.2 to 2.2.3 (#1839) Bumps [rack](https://github.com/rack/rack) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v2.2.2...2.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [FIX] Unable to edit long recording names #1776 (#1780) * Allow to set a filter for LDAP authentication * [FIX] Unable to edit long recording names #1776 Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: farhatahmad <ahmad.af.farhat@gmail.com> * Desgin for Manage Users Tabs (#1777) * Update _subtitle.html.erb * Update _manage_users_tags.html.erb * Update admins.scss * Update _primary_themes.scss * Update _manage_users_tags.html.erb * Minor style changes to manage users (#1845) * Maintenance banner moved to admin site (#1775) * initial * finish * travis fixes * travis again * not required * Co-authored-by: Tobias Fiebig <t.fiebig@tudelft.nl> (#1296) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Enhance Room OpenGraph Metadata (#1601) * Revert "Enhance Room OpenGraph Metadata (#1601)" (#1852) This reverts commit 3b007c233ae12e0407f216ae269c63d6179f73b8. * GRN2-xx: Tab title now displays the current page name (#1853) * Tab title now displays the current page name * Added page title for the rest of the pages * Split Site Settings into 3 different tabs (#1858) * Split Site Settings into 3 different tabs * Fix copyright * Added redirect to correct tab * Make sure settings are displaying when they should * Update en.yml (#1857) * Build images for alpha branches (#1867) * Upgraded jquery to latest version (#1896) * Added favicon tag (#1898) * Fixed XSS issue with role name (#1899) * Update path for coloring redirect (#1908) * Added a fourth section to the room uid (#1910) * Fixed issue with insecure room sharing removal (#1914) * Fixes typo (#1917) Fixes typo: successfully was written incorrect. * Fixed order of rooms in server rooms (#1915) * Change default room sort to latest activity (#1919) * GRN2-xx: Small changes/improvements to the recording settings (#1851) * Small changes/improvements to the recording settings * Replaced room warning with info flash * Added global setting to enable/disable the recording consent feature * Replace Legal with Terms (#1931) * Added a more friendly OpenGraph description when invited to join a room (#1932) * Fixed issue causing maintenance banner not to hide correctly (#1933) * Hide recording menu and recording list when it is disabled (#1935) * Hide recording menu and recording list when it is disabled * Hide recording list when disabled * GRN2-xx: Added an auto-refresh after 2 mins while waiting for room to start (#1947) * Added an auto-refresh after 2 mins while waiting for room to start * Fixed random issue with test case * GRN2-xx: Added ability to preupload presentations to rooms (#1895) * Added ability to preupload presentations to rooms (#1868) * Added setting to site settings and allowed admins to change the presentation * Added AWS S3 and GCS Storage ENV variables * Added check to ensure file extension is correct * Added icon to remove presentation * Added testcases for preupload * Add nginx redirect to solve issue with relative root * Record title, instead of room name, in the popup (#1924) * Update _public_recording_row.html.erb * Update _recording_row.html.erb Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: beckerr-rzht <beckerr@hochschule-trier.de> Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: yanosz <yanosz@users.noreply.github.com> Co-authored-by: Moritz Schlarb <moschlar@metalabs.de> Co-authored-by: chronikum <34622984+chronikum@users.noreply.github.com> Co-authored-by: Mitsutaka Sato <miztaka@honestyworks.jp> Co-authored-by: hiroshisuga <45039819+hiroshisuga@users.noreply.github.com>
2020-07-29 11:03:22 -04:00
post :update_settings, params: { setting: "Primary Color Darken", value: primary_color, tab: "appearance" }
feature = Setting.find_by(provider: "provider1").features.find_by(name: "Primary Color Darken")
expect(feature[:value]).to eq(primary_color)
Merge v2.7-alpha (#1951) * Fix wrong conditional (reported by LGTM) (#1477) Signed-off-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Bump rack from 2.2.2 to 2.2.3 (#1839) Bumps [rack](https://github.com/rack/rack) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v2.2.2...2.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [FIX] Unable to edit long recording names #1776 (#1780) * Allow to set a filter for LDAP authentication * [FIX] Unable to edit long recording names #1776 Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: farhatahmad <ahmad.af.farhat@gmail.com> * Desgin for Manage Users Tabs (#1777) * Update _subtitle.html.erb * Update _manage_users_tags.html.erb * Update admins.scss * Update _primary_themes.scss * Update _manage_users_tags.html.erb * Minor style changes to manage users (#1845) * Maintenance banner moved to admin site (#1775) * initial * finish * travis fixes * travis again * not required * Co-authored-by: Tobias Fiebig <t.fiebig@tudelft.nl> (#1296) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Enhance Room OpenGraph Metadata (#1601) * Revert "Enhance Room OpenGraph Metadata (#1601)" (#1852) This reverts commit 3b007c233ae12e0407f216ae269c63d6179f73b8. * GRN2-xx: Tab title now displays the current page name (#1853) * Tab title now displays the current page name * Added page title for the rest of the pages * Split Site Settings into 3 different tabs (#1858) * Split Site Settings into 3 different tabs * Fix copyright * Added redirect to correct tab * Make sure settings are displaying when they should * Update en.yml (#1857) * Build images for alpha branches (#1867) * Upgraded jquery to latest version (#1896) * Added favicon tag (#1898) * Fixed XSS issue with role name (#1899) * Update path for coloring redirect (#1908) * Added a fourth section to the room uid (#1910) * Fixed issue with insecure room sharing removal (#1914) * Fixes typo (#1917) Fixes typo: successfully was written incorrect. * Fixed order of rooms in server rooms (#1915) * Change default room sort to latest activity (#1919) * GRN2-xx: Small changes/improvements to the recording settings (#1851) * Small changes/improvements to the recording settings * Replaced room warning with info flash * Added global setting to enable/disable the recording consent feature * Replace Legal with Terms (#1931) * Added a more friendly OpenGraph description when invited to join a room (#1932) * Fixed issue causing maintenance banner not to hide correctly (#1933) * Hide recording menu and recording list when it is disabled (#1935) * Hide recording menu and recording list when it is disabled * Hide recording list when disabled * GRN2-xx: Added an auto-refresh after 2 mins while waiting for room to start (#1947) * Added an auto-refresh after 2 mins while waiting for room to start * Fixed random issue with test case * GRN2-xx: Added ability to preupload presentations to rooms (#1895) * Added ability to preupload presentations to rooms (#1868) * Added setting to site settings and allowed admins to change the presentation * Added AWS S3 and GCS Storage ENV variables * Added check to ensure file extension is correct * Added icon to remove presentation * Added testcases for preupload * Add nginx redirect to solve issue with relative root * Record title, instead of room name, in the popup (#1924) * Update _public_recording_row.html.erb * Update _recording_row.html.erb Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: beckerr-rzht <beckerr@hochschule-trier.de> Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: yanosz <yanosz@users.noreply.github.com> Co-authored-by: Moritz Schlarb <moschlar@metalabs.de> Co-authored-by: chronikum <34622984+chronikum@users.noreply.github.com> Co-authored-by: Mitsutaka Sato <miztaka@honestyworks.jp> Co-authored-by: hiroshisuga <45039819+hiroshisuga@users.noreply.github.com>
2020-07-29 11:03:22 -04:00
expect(response).to redirect_to(admin_site_settings_path(tab: "appearance"))
end
end
end
describe "Site Settings" do
context "POST #registration_method" do
it "changes the registration method for the given context" do
allow(Rails.configuration).to receive(:enable_email_verification).and_return(true)
allow(Rails.configuration).to receive(:loadbalanced_configuration).and_return(true)
allow_any_instance_of(User).to receive(:greenlight_account?).and_return(true)
@request.session[:user_id] = @admin.id
post :registration_method, params: { value: "invite" }
feature = Setting.find_by(provider: "provider1").features.find_by(name: "Registration Method")
expect(feature[:value]).to eq(Rails.configuration.registration_methods[:invite])
expect(flash[:success]).to be_present
Merge v2.7-alpha (#1951) * Fix wrong conditional (reported by LGTM) (#1477) Signed-off-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Bump rack from 2.2.2 to 2.2.3 (#1839) Bumps [rack](https://github.com/rack/rack) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v2.2.2...2.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [FIX] Unable to edit long recording names #1776 (#1780) * Allow to set a filter for LDAP authentication * [FIX] Unable to edit long recording names #1776 Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: farhatahmad <ahmad.af.farhat@gmail.com> * Desgin for Manage Users Tabs (#1777) * Update _subtitle.html.erb * Update _manage_users_tags.html.erb * Update admins.scss * Update _primary_themes.scss * Update _manage_users_tags.html.erb * Minor style changes to manage users (#1845) * Maintenance banner moved to admin site (#1775) * initial * finish * travis fixes * travis again * not required * Co-authored-by: Tobias Fiebig <t.fiebig@tudelft.nl> (#1296) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Enhance Room OpenGraph Metadata (#1601) * Revert "Enhance Room OpenGraph Metadata (#1601)" (#1852) This reverts commit 3b007c233ae12e0407f216ae269c63d6179f73b8. * GRN2-xx: Tab title now displays the current page name (#1853) * Tab title now displays the current page name * Added page title for the rest of the pages * Split Site Settings into 3 different tabs (#1858) * Split Site Settings into 3 different tabs * Fix copyright * Added redirect to correct tab * Make sure settings are displaying when they should * Update en.yml (#1857) * Build images for alpha branches (#1867) * Upgraded jquery to latest version (#1896) * Added favicon tag (#1898) * Fixed XSS issue with role name (#1899) * Update path for coloring redirect (#1908) * Added a fourth section to the room uid (#1910) * Fixed issue with insecure room sharing removal (#1914) * Fixes typo (#1917) Fixes typo: successfully was written incorrect. * Fixed order of rooms in server rooms (#1915) * Change default room sort to latest activity (#1919) * GRN2-xx: Small changes/improvements to the recording settings (#1851) * Small changes/improvements to the recording settings * Replaced room warning with info flash * Added global setting to enable/disable the recording consent feature * Replace Legal with Terms (#1931) * Added a more friendly OpenGraph description when invited to join a room (#1932) * Fixed issue causing maintenance banner not to hide correctly (#1933) * Hide recording menu and recording list when it is disabled (#1935) * Hide recording menu and recording list when it is disabled * Hide recording list when disabled * GRN2-xx: Added an auto-refresh after 2 mins while waiting for room to start (#1947) * Added an auto-refresh after 2 mins while waiting for room to start * Fixed random issue with test case * GRN2-xx: Added ability to preupload presentations to rooms (#1895) * Added ability to preupload presentations to rooms (#1868) * Added setting to site settings and allowed admins to change the presentation * Added AWS S3 and GCS Storage ENV variables * Added check to ensure file extension is correct * Added icon to remove presentation * Added testcases for preupload * Add nginx redirect to solve issue with relative root * Record title, instead of room name, in the popup (#1924) * Update _public_recording_row.html.erb * Update _recording_row.html.erb Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: beckerr-rzht <beckerr@hochschule-trier.de> Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: yanosz <yanosz@users.noreply.github.com> Co-authored-by: Moritz Schlarb <moschlar@metalabs.de> Co-authored-by: chronikum <34622984+chronikum@users.noreply.github.com> Co-authored-by: Mitsutaka Sato <miztaka@honestyworks.jp> Co-authored-by: hiroshisuga <45039819+hiroshisuga@users.noreply.github.com>
2020-07-29 11:03:22 -04:00
expect(response).to redirect_to(admin_site_settings_path(tab: "settings"))
end
it "does not allow the user to change to invite if emails are off" do
allow(Rails.configuration).to receive(:enable_email_verification).and_return(false)
allow(Rails.configuration).to receive(:loadbalanced_configuration).and_return(true)
allow_any_instance_of(User).to receive(:greenlight_account?).and_return(true)
@request.session[:user_id] = @admin.id
post :registration_method, params: { value: "invite" }
expect(flash[:alert]).to be_present
Merge v2.7-alpha (#1951) * Fix wrong conditional (reported by LGTM) (#1477) Signed-off-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Bump rack from 2.2.2 to 2.2.3 (#1839) Bumps [rack](https://github.com/rack/rack) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v2.2.2...2.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [FIX] Unable to edit long recording names #1776 (#1780) * Allow to set a filter for LDAP authentication * [FIX] Unable to edit long recording names #1776 Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: farhatahmad <ahmad.af.farhat@gmail.com> * Desgin for Manage Users Tabs (#1777) * Update _subtitle.html.erb * Update _manage_users_tags.html.erb * Update admins.scss * Update _primary_themes.scss * Update _manage_users_tags.html.erb * Minor style changes to manage users (#1845) * Maintenance banner moved to admin site (#1775) * initial * finish * travis fixes * travis again * not required * Co-authored-by: Tobias Fiebig <t.fiebig@tudelft.nl> (#1296) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Enhance Room OpenGraph Metadata (#1601) * Revert "Enhance Room OpenGraph Metadata (#1601)" (#1852) This reverts commit 3b007c233ae12e0407f216ae269c63d6179f73b8. * GRN2-xx: Tab title now displays the current page name (#1853) * Tab title now displays the current page name * Added page title for the rest of the pages * Split Site Settings into 3 different tabs (#1858) * Split Site Settings into 3 different tabs * Fix copyright * Added redirect to correct tab * Make sure settings are displaying when they should * Update en.yml (#1857) * Build images for alpha branches (#1867) * Upgraded jquery to latest version (#1896) * Added favicon tag (#1898) * Fixed XSS issue with role name (#1899) * Update path for coloring redirect (#1908) * Added a fourth section to the room uid (#1910) * Fixed issue with insecure room sharing removal (#1914) * Fixes typo (#1917) Fixes typo: successfully was written incorrect. * Fixed order of rooms in server rooms (#1915) * Change default room sort to latest activity (#1919) * GRN2-xx: Small changes/improvements to the recording settings (#1851) * Small changes/improvements to the recording settings * Replaced room warning with info flash * Added global setting to enable/disable the recording consent feature * Replace Legal with Terms (#1931) * Added a more friendly OpenGraph description when invited to join a room (#1932) * Fixed issue causing maintenance banner not to hide correctly (#1933) * Hide recording menu and recording list when it is disabled (#1935) * Hide recording menu and recording list when it is disabled * Hide recording list when disabled * GRN2-xx: Added an auto-refresh after 2 mins while waiting for room to start (#1947) * Added an auto-refresh after 2 mins while waiting for room to start * Fixed random issue with test case * GRN2-xx: Added ability to preupload presentations to rooms (#1895) * Added ability to preupload presentations to rooms (#1868) * Added setting to site settings and allowed admins to change the presentation * Added AWS S3 and GCS Storage ENV variables * Added check to ensure file extension is correct * Added icon to remove presentation * Added testcases for preupload * Add nginx redirect to solve issue with relative root * Record title, instead of room name, in the popup (#1924) * Update _public_recording_row.html.erb * Update _recording_row.html.erb Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: beckerr-rzht <beckerr@hochschule-trier.de> Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: yanosz <yanosz@users.noreply.github.com> Co-authored-by: Moritz Schlarb <moschlar@metalabs.de> Co-authored-by: chronikum <34622984+chronikum@users.noreply.github.com> Co-authored-by: Mitsutaka Sato <miztaka@honestyworks.jp> Co-authored-by: hiroshisuga <45039819+hiroshisuga@users.noreply.github.com>
2020-07-29 11:03:22 -04:00
expect(response).to redirect_to(admin_site_settings_path(tab: "settings"))
Admin panel (#496) * Added the administrator role and functionality that comes with it (#403) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * Update user.rb * Update admins.js * GRN-15: Added the ability to change color and image from admin interface (#425) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Update user.rb * Update user.rb * Update routes.rb * Update admins_controller.rb * GRN-87:Added a super admin role and made changes to how to the design works (#430) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * Update user.rb * Update themes_controller_spec.rb * Update routes.rb * Update admins_controller.rb * Removed duplicated code that broke the build after last merge * GRN-78: Restructured some of the views to make the UI more consistent and responsive (#435) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * GRN-78: Cleaned up buttons and moved signin to its own page * GRN-78: Moved the Rooms and Recordings link to nav bar * Merge fix * Views restructure fix (#458) * Added cache to gitlab-ci.yml * Restructured seed * GRN2-99 -> GRN2-106: UI cleanup and refactoring (#478) * GRN2-98: Change Fullname to Full name * GRN2-105: Changed View Users to Manage Users * GRN2-101/103: Updated email to match branding * GRN2-100: Updated Email Sent flash to be more descriptive * GRN2-104: Redirect user to sign in page w/ flash after clicking activation link * GRN2-102: Changed the wording in the verification email * GRN2-99: Added email form validation * GRN2-106: Cleaned up Users list front end * Fixes to rake and admin password validator for passing rubocop * GRN2-113: Fixed issues with admin panel (#479) * GRN2-116: Code clean up after restructure of views (#482) * Removed unused references * Rubocop * Added pagination to admin view (#483) * GRN2-114: Added the ability for admins to ban/unban users (#487) * Added the ability for admins to ban and unban users * Update sessions_helper.rb * Merge branch 'master' into admin-panel (#492) * Updated rubocop gem * Updated rubocop and fixed issues (#490) * Rubocop fixes * GRN2-122: Updated sign in flow for admins and switch design tab to site settings (#489) * Switched design tab to site settings * Update _header with spaces instead of tabs * Added more test cases to increase coverage (#494)
2019-05-03 13:05:12 -04:00
end
end
context "POST #room_authentication" do
it "changes the room authentication required setting" do
allow(Rails.configuration).to receive(:loadbalanced_configuration).and_return(true)
allow_any_instance_of(User).to receive(:greenlight_account?).and_return(true)
@request.session[:user_id] = @admin.id
post :update_settings, params: { setting: "Room Authentication", value: "true" }
feature = Setting.find_by(provider: "provider1").features.find_by(name: "Room Authentication")
2019-05-23 13:21:43 -04:00
expect(feature[:value]).to eq("true")
Merge v2.7-alpha (#1951) * Fix wrong conditional (reported by LGTM) (#1477) Signed-off-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Bump rack from 2.2.2 to 2.2.3 (#1839) Bumps [rack](https://github.com/rack/rack) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v2.2.2...2.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [FIX] Unable to edit long recording names #1776 (#1780) * Allow to set a filter for LDAP authentication * [FIX] Unable to edit long recording names #1776 Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: farhatahmad <ahmad.af.farhat@gmail.com> * Desgin for Manage Users Tabs (#1777) * Update _subtitle.html.erb * Update _manage_users_tags.html.erb * Update admins.scss * Update _primary_themes.scss * Update _manage_users_tags.html.erb * Minor style changes to manage users (#1845) * Maintenance banner moved to admin site (#1775) * initial * finish * travis fixes * travis again * not required * Co-authored-by: Tobias Fiebig <t.fiebig@tudelft.nl> (#1296) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Enhance Room OpenGraph Metadata (#1601) * Revert "Enhance Room OpenGraph Metadata (#1601)" (#1852) This reverts commit 3b007c233ae12e0407f216ae269c63d6179f73b8. * GRN2-xx: Tab title now displays the current page name (#1853) * Tab title now displays the current page name * Added page title for the rest of the pages * Split Site Settings into 3 different tabs (#1858) * Split Site Settings into 3 different tabs * Fix copyright * Added redirect to correct tab * Make sure settings are displaying when they should * Update en.yml (#1857) * Build images for alpha branches (#1867) * Upgraded jquery to latest version (#1896) * Added favicon tag (#1898) * Fixed XSS issue with role name (#1899) * Update path for coloring redirect (#1908) * Added a fourth section to the room uid (#1910) * Fixed issue with insecure room sharing removal (#1914) * Fixes typo (#1917) Fixes typo: successfully was written incorrect. * Fixed order of rooms in server rooms (#1915) * Change default room sort to latest activity (#1919) * GRN2-xx: Small changes/improvements to the recording settings (#1851) * Small changes/improvements to the recording settings * Replaced room warning with info flash * Added global setting to enable/disable the recording consent feature * Replace Legal with Terms (#1931) * Added a more friendly OpenGraph description when invited to join a room (#1932) * Fixed issue causing maintenance banner not to hide correctly (#1933) * Hide recording menu and recording list when it is disabled (#1935) * Hide recording menu and recording list when it is disabled * Hide recording list when disabled * GRN2-xx: Added an auto-refresh after 2 mins while waiting for room to start (#1947) * Added an auto-refresh after 2 mins while waiting for room to start * Fixed random issue with test case * GRN2-xx: Added ability to preupload presentations to rooms (#1895) * Added ability to preupload presentations to rooms (#1868) * Added setting to site settings and allowed admins to change the presentation * Added AWS S3 and GCS Storage ENV variables * Added check to ensure file extension is correct * Added icon to remove presentation * Added testcases for preupload * Add nginx redirect to solve issue with relative root * Record title, instead of room name, in the popup (#1924) * Update _public_recording_row.html.erb * Update _recording_row.html.erb Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: beckerr-rzht <beckerr@hochschule-trier.de> Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: yanosz <yanosz@users.noreply.github.com> Co-authored-by: Moritz Schlarb <moschlar@metalabs.de> Co-authored-by: chronikum <34622984+chronikum@users.noreply.github.com> Co-authored-by: Mitsutaka Sato <miztaka@honestyworks.jp> Co-authored-by: hiroshisuga <45039819+hiroshisuga@users.noreply.github.com>
2020-07-29 11:03:22 -04:00
expect(response).to redirect_to(admin_site_settings_path(tab: "settings"))
end
end
context "POST #room_limit" do
it "changes the room limit setting" do
allow(Rails.configuration).to receive(:loadbalanced_configuration).and_return(true)
allow_any_instance_of(User).to receive(:greenlight_account?).and_return(true)
@request.session[:user_id] = @admin.id
post :update_settings, params: { setting: "Room Limit", value: 5 }
feature = Setting.find_by(provider: "provider1").features.find_by(name: "Room Limit")
expect(feature[:value]).to eq("5")
Merge v2.7-alpha (#1951) * Fix wrong conditional (reported by LGTM) (#1477) Signed-off-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Bump rack from 2.2.2 to 2.2.3 (#1839) Bumps [rack](https://github.com/rack/rack) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v2.2.2...2.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [FIX] Unable to edit long recording names #1776 (#1780) * Allow to set a filter for LDAP authentication * [FIX] Unable to edit long recording names #1776 Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: farhatahmad <ahmad.af.farhat@gmail.com> * Desgin for Manage Users Tabs (#1777) * Update _subtitle.html.erb * Update _manage_users_tags.html.erb * Update admins.scss * Update _primary_themes.scss * Update _manage_users_tags.html.erb * Minor style changes to manage users (#1845) * Maintenance banner moved to admin site (#1775) * initial * finish * travis fixes * travis again * not required * Co-authored-by: Tobias Fiebig <t.fiebig@tudelft.nl> (#1296) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Enhance Room OpenGraph Metadata (#1601) * Revert "Enhance Room OpenGraph Metadata (#1601)" (#1852) This reverts commit 3b007c233ae12e0407f216ae269c63d6179f73b8. * GRN2-xx: Tab title now displays the current page name (#1853) * Tab title now displays the current page name * Added page title for the rest of the pages * Split Site Settings into 3 different tabs (#1858) * Split Site Settings into 3 different tabs * Fix copyright * Added redirect to correct tab * Make sure settings are displaying when they should * Update en.yml (#1857) * Build images for alpha branches (#1867) * Upgraded jquery to latest version (#1896) * Added favicon tag (#1898) * Fixed XSS issue with role name (#1899) * Update path for coloring redirect (#1908) * Added a fourth section to the room uid (#1910) * Fixed issue with insecure room sharing removal (#1914) * Fixes typo (#1917) Fixes typo: successfully was written incorrect. * Fixed order of rooms in server rooms (#1915) * Change default room sort to latest activity (#1919) * GRN2-xx: Small changes/improvements to the recording settings (#1851) * Small changes/improvements to the recording settings * Replaced room warning with info flash * Added global setting to enable/disable the recording consent feature * Replace Legal with Terms (#1931) * Added a more friendly OpenGraph description when invited to join a room (#1932) * Fixed issue causing maintenance banner not to hide correctly (#1933) * Hide recording menu and recording list when it is disabled (#1935) * Hide recording menu and recording list when it is disabled * Hide recording list when disabled * GRN2-xx: Added an auto-refresh after 2 mins while waiting for room to start (#1947) * Added an auto-refresh after 2 mins while waiting for room to start * Fixed random issue with test case * GRN2-xx: Added ability to preupload presentations to rooms (#1895) * Added ability to preupload presentations to rooms (#1868) * Added setting to site settings and allowed admins to change the presentation * Added AWS S3 and GCS Storage ENV variables * Added check to ensure file extension is correct * Added icon to remove presentation * Added testcases for preupload * Add nginx redirect to solve issue with relative root * Record title, instead of room name, in the popup (#1924) * Update _public_recording_row.html.erb * Update _recording_row.html.erb Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: beckerr-rzht <beckerr@hochschule-trier.de> Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: yanosz <yanosz@users.noreply.github.com> Co-authored-by: Moritz Schlarb <moschlar@metalabs.de> Co-authored-by: chronikum <34622984+chronikum@users.noreply.github.com> Co-authored-by: Mitsutaka Sato <miztaka@honestyworks.jp> Co-authored-by: hiroshisuga <45039819+hiroshisuga@users.noreply.github.com>
2020-07-29 11:03:22 -04:00
expect(response).to redirect_to(admin_site_settings_path(tab: "settings"))
end
end
context "POST #default_recording_visibility" do
it "changes the default recording visibility setting" do
allow(Rails.configuration).to receive(:loadbalanced_configuration).and_return(true)
allow_any_instance_of(User).to receive(:greenlight_account?).and_return(true)
@request.session[:user_id] = @admin.id
post :update_settings, params: { setting: "Default Recording Visibility", value: "public" }
feature = Setting.find_by(provider: "provider1").features.find_by(name: "Default Recording Visibility")
expect(feature[:value]).to eq("public")
Merge v2.7-alpha (#1951) * Fix wrong conditional (reported by LGTM) (#1477) Signed-off-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Bump rack from 2.2.2 to 2.2.3 (#1839) Bumps [rack](https://github.com/rack/rack) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v2.2.2...2.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [FIX] Unable to edit long recording names #1776 (#1780) * Allow to set a filter for LDAP authentication * [FIX] Unable to edit long recording names #1776 Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: farhatahmad <ahmad.af.farhat@gmail.com> * Desgin for Manage Users Tabs (#1777) * Update _subtitle.html.erb * Update _manage_users_tags.html.erb * Update admins.scss * Update _primary_themes.scss * Update _manage_users_tags.html.erb * Minor style changes to manage users (#1845) * Maintenance banner moved to admin site (#1775) * initial * finish * travis fixes * travis again * not required * Co-authored-by: Tobias Fiebig <t.fiebig@tudelft.nl> (#1296) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Enhance Room OpenGraph Metadata (#1601) * Revert "Enhance Room OpenGraph Metadata (#1601)" (#1852) This reverts commit 3b007c233ae12e0407f216ae269c63d6179f73b8. * GRN2-xx: Tab title now displays the current page name (#1853) * Tab title now displays the current page name * Added page title for the rest of the pages * Split Site Settings into 3 different tabs (#1858) * Split Site Settings into 3 different tabs * Fix copyright * Added redirect to correct tab * Make sure settings are displaying when they should * Update en.yml (#1857) * Build images for alpha branches (#1867) * Upgraded jquery to latest version (#1896) * Added favicon tag (#1898) * Fixed XSS issue with role name (#1899) * Update path for coloring redirect (#1908) * Added a fourth section to the room uid (#1910) * Fixed issue with insecure room sharing removal (#1914) * Fixes typo (#1917) Fixes typo: successfully was written incorrect. * Fixed order of rooms in server rooms (#1915) * Change default room sort to latest activity (#1919) * GRN2-xx: Small changes/improvements to the recording settings (#1851) * Small changes/improvements to the recording settings * Replaced room warning with info flash * Added global setting to enable/disable the recording consent feature * Replace Legal with Terms (#1931) * Added a more friendly OpenGraph description when invited to join a room (#1932) * Fixed issue causing maintenance banner not to hide correctly (#1933) * Hide recording menu and recording list when it is disabled (#1935) * Hide recording menu and recording list when it is disabled * Hide recording list when disabled * GRN2-xx: Added an auto-refresh after 2 mins while waiting for room to start (#1947) * Added an auto-refresh after 2 mins while waiting for room to start * Fixed random issue with test case * GRN2-xx: Added ability to preupload presentations to rooms (#1895) * Added ability to preupload presentations to rooms (#1868) * Added setting to site settings and allowed admins to change the presentation * Added AWS S3 and GCS Storage ENV variables * Added check to ensure file extension is correct * Added icon to remove presentation * Added testcases for preupload * Add nginx redirect to solve issue with relative root * Record title, instead of room name, in the popup (#1924) * Update _public_recording_row.html.erb * Update _recording_row.html.erb Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: beckerr-rzht <beckerr@hochschule-trier.de> Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: yanosz <yanosz@users.noreply.github.com> Co-authored-by: Moritz Schlarb <moschlar@metalabs.de> Co-authored-by: chronikum <34622984+chronikum@users.noreply.github.com> Co-authored-by: Mitsutaka Sato <miztaka@honestyworks.jp> Co-authored-by: hiroshisuga <45039819+hiroshisuga@users.noreply.github.com>
2020-07-29 11:03:22 -04:00
expect(response).to redirect_to(admin_site_settings_path(tab: "settings"))
end
end
context "POST #maintenance_banner" do
it "displays a banner with the maintenance string" do
allow(Rails.configuration).to receive(:loadbalanced_configuration).and_return(true)
allow_any_instance_of(User).to receive(:greenlight_account?).and_return(true)
@request.session[:user_id] = @admin.id
fake_banner_string = "Maintenance work at 2 pm"
post :update_settings, params: { setting: "Maintenance Banner", value: fake_banner_string, tab: "administration" }
feature = Setting.find_by(provider: "provider1").features.find_by(name: "Maintenance Banner")
expect(flash[:success]).to be_present
expect(feature[:value]).to eq(fake_banner_string)
expect(response).to redirect_to(admin_site_settings_path(tab: "administration"))
end
end
context "POST #shared_access" do
it "changes the shared access setting" do
allow(Rails.configuration).to receive(:loadbalanced_configuration).and_return(true)
allow_any_instance_of(User).to receive(:greenlight_account?).and_return(true)
@request.session[:user_id] = @admin.id
post :update_settings, params: { setting: "Shared Access", value: "false" }
feature = Setting.find_by(provider: "provider1").features.find_by(name: "Shared Access")
expect(feature[:value]).to eq("false")
Merge v2.7-alpha (#1951) * Fix wrong conditional (reported by LGTM) (#1477) Signed-off-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Bump rack from 2.2.2 to 2.2.3 (#1839) Bumps [rack](https://github.com/rack/rack) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v2.2.2...2.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [FIX] Unable to edit long recording names #1776 (#1780) * Allow to set a filter for LDAP authentication * [FIX] Unable to edit long recording names #1776 Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: farhatahmad <ahmad.af.farhat@gmail.com> * Desgin for Manage Users Tabs (#1777) * Update _subtitle.html.erb * Update _manage_users_tags.html.erb * Update admins.scss * Update _primary_themes.scss * Update _manage_users_tags.html.erb * Minor style changes to manage users (#1845) * Maintenance banner moved to admin site (#1775) * initial * finish * travis fixes * travis again * not required * Co-authored-by: Tobias Fiebig <t.fiebig@tudelft.nl> (#1296) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Enhance Room OpenGraph Metadata (#1601) * Revert "Enhance Room OpenGraph Metadata (#1601)" (#1852) This reverts commit 3b007c233ae12e0407f216ae269c63d6179f73b8. * GRN2-xx: Tab title now displays the current page name (#1853) * Tab title now displays the current page name * Added page title for the rest of the pages * Split Site Settings into 3 different tabs (#1858) * Split Site Settings into 3 different tabs * Fix copyright * Added redirect to correct tab * Make sure settings are displaying when they should * Update en.yml (#1857) * Build images for alpha branches (#1867) * Upgraded jquery to latest version (#1896) * Added favicon tag (#1898) * Fixed XSS issue with role name (#1899) * Update path for coloring redirect (#1908) * Added a fourth section to the room uid (#1910) * Fixed issue with insecure room sharing removal (#1914) * Fixes typo (#1917) Fixes typo: successfully was written incorrect. * Fixed order of rooms in server rooms (#1915) * Change default room sort to latest activity (#1919) * GRN2-xx: Small changes/improvements to the recording settings (#1851) * Small changes/improvements to the recording settings * Replaced room warning with info flash * Added global setting to enable/disable the recording consent feature * Replace Legal with Terms (#1931) * Added a more friendly OpenGraph description when invited to join a room (#1932) * Fixed issue causing maintenance banner not to hide correctly (#1933) * Hide recording menu and recording list when it is disabled (#1935) * Hide recording menu and recording list when it is disabled * Hide recording list when disabled * GRN2-xx: Added an auto-refresh after 2 mins while waiting for room to start (#1947) * Added an auto-refresh after 2 mins while waiting for room to start * Fixed random issue with test case * GRN2-xx: Added ability to preupload presentations to rooms (#1895) * Added ability to preupload presentations to rooms (#1868) * Added setting to site settings and allowed admins to change the presentation * Added AWS S3 and GCS Storage ENV variables * Added check to ensure file extension is correct * Added icon to remove presentation * Added testcases for preupload * Add nginx redirect to solve issue with relative root * Record title, instead of room name, in the popup (#1924) * Update _public_recording_row.html.erb * Update _recording_row.html.erb Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: beckerr-rzht <beckerr@hochschule-trier.de> Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: yanosz <yanosz@users.noreply.github.com> Co-authored-by: Moritz Schlarb <moschlar@metalabs.de> Co-authored-by: chronikum <34622984+chronikum@users.noreply.github.com> Co-authored-by: Mitsutaka Sato <miztaka@honestyworks.jp> Co-authored-by: hiroshisuga <45039819+hiroshisuga@users.noreply.github.com>
2020-07-29 11:03:22 -04:00
expect(response).to redirect_to(admin_site_settings_path(tab: "settings"))
end
end
context "POST #clear_auth" do
it "clears all users social uids if clear auth button is clicked" do
allow_any_instance_of(ApplicationController).to receive(:set_user_domain).and_return("provider1")
controller.instance_variable_set(:@user_domain, "provider1")
@request.session[:user_id] = @admin.id
Merge v2.6-alpha (#1672) * GRN2-xx: Switch the relation between users and roles to make queries cleaner and faster (#1299) * First steps * Fixes in account creation flow * Fixed most testcases * more test fixes * Fixed more test cases * Passing tests and rubocop * Added rake task to remove rooms * Adding translation (#1510) * Update _account.html.erb * Update en.yml * Fix "for" attribute for label elements (#1488) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix some issues reported by LGTM (#1478) * Declare local JavaScript variables (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Remove unused local JavaScript variable (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Puma Worker Configuration (#1332) We noticed that the current default settings perform very poorly under load. We managed to literally take down Greenlight during a larger event when people where accessing the landing page for rooms and when doing some tests, I was more or less able to DoS Greenlight on my own. This patch adds a default worker configuration which significantly improves the situation. The small, 4 core machine I was testing on could handle about thrice the amount of requests. While the new default configuration should be reasonably well suited for most deployments, this patch further allows users to easily configure the worker pool on their own in the environment file. * Made name and email readonly for no greenlight accounts (#1534) * Fixed hardcoded string (#1532) * fixed spelling error that was bugging me :) - sep a rat e (#1535) Co-authored-by: Dave Lane <dave@oerfoundation.org> * Improve Server Rooms View (#1524) * Order rooms by status * Cleaned up order function * Now displays Started/Created/Ended * Added participant count to rooms list * Fix rake task user:create so that users can be created when terms are present (#1565) * Changed user create task to always accept terms * clean up * More secure room ID (#1451) * Legal and privpolicy link (#1421) * add customizable Links to Imprint and Privacy Policy * fix copy&paste error in spec * replace "imprint" with "legal" since that is the correct term * remove german translation of new strings, transifex will take care of them later * GRN2-295:Refactored update profile and update password (#1591) * Refactored update profile and update password * Relowered rubocop settings * Fixed email sending when not supposed to (#1592) * Design changes for small screens (#1580) * now rap for pagination * Update _subtitle.html.erb * Update _rooms.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update _users.html.erb * Update cant_create_rooms.html.erb * Update room.js * Update edit.html.erb * Update new.html.erb * Update cant_create_rooms.html.erb * Update _sessions.html.erb * Update _account.html.erb * Make Greenlight work with Ruby 2.7 (#1560) Greenlight's failure to start up with Ruby 2.7 seems to be caused by [an issue in bootsnap](https://github.com/Shopify/bootsnap/issues/258). Updating that library makes Greenlight work again. However, there are still a lot of deprecation warnings. But that's something to deal with separately. This fixes #1558 * use email input for sign in (#1199) * use email input for sign in * use email input for registration * use email input for invitation * use email input for account settings Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix Gemfile (#1593) * Fixed invalid token for password reset (#1632) * HELP_URL env variable now works as expected (#1636) * #1372 Fix for long Text in Table + Remove invalid HTML Tag (#1403) * removed invalid HTML Tag * removed invalid HTML Tag * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _server_recording_row.html.erb form-inline replaced by own css * Update _server_room_row.html.erb * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _public_recording_row.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update main.scss fix for long text * Update main.scss * Update _public_recording_row.html.erb * Added more validation on profile image (#1644) * Users who can't create rooms but have shared rooms now have a different view (#1649) * Revert "Puma Worker Configuration (#1332)" (#1667) This reverts commit 78ed8d74601b613af3fd96ccf75a6bada24deddd. * Removed html safe from all flash messages (#1668) * Remove hardcoded guest=true if require mod approval is set (#1669) * Change random generation for room uid (#1670) * GRN2-290: Update gems and update to Rails 5.2.4.3 (#1671) * Update gems and update to Rails 5.2.4.3 * remove gemfile error Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: Florian Weber <fnwbr@users.noreply.github.com> Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Lars Kiesow <lkiesow@uos.de> Co-authored-by: Dave Lane <dave@lane.net.nz> Co-authored-by: Dave Lane <dave@oerfoundation.org> Co-authored-by: Henning <hng@users.noreply.github.com> Co-authored-by: Marcel Waldvogel <marcel@waldvogel.family> Co-authored-by: Christian Marg <marg@rz.tu-clausthal.de> Co-authored-by: Klaus <klaus@jsxc.org>
2020-05-26 17:37:23 -04:00
@admin.set_role :super_admin
@admin.update_attribute(:provider, "greenlight")
@user2 = create(:user, provider: "provider1")
@user3 = create(:user, provider: "provider1")
@user.update_attribute(:social_uid, Faker::Internet.password)
@user2.update_attribute(:social_uid, Faker::Internet.password)
@user3.update_attribute(:social_uid, Faker::Internet.password)
expect(@user.social_uid).not_to be(nil)
expect(@user2.social_uid).not_to be(nil)
expect(@user3.social_uid).not_to be(nil)
post :clear_auth
@user.reload
@user2.reload
@user3.reload
expect(@user.social_uid).to be(nil)
expect(@user2.social_uid).to be(nil)
expect(@user3.social_uid).to be(nil)
end
end
context "POST #log_level" do
it "changes the log level" do
@request.session[:user_id] = @admin.id
Merge v2.6-alpha (#1672) * GRN2-xx: Switch the relation between users and roles to make queries cleaner and faster (#1299) * First steps * Fixes in account creation flow * Fixed most testcases * more test fixes * Fixed more test cases * Passing tests and rubocop * Added rake task to remove rooms * Adding translation (#1510) * Update _account.html.erb * Update en.yml * Fix "for" attribute for label elements (#1488) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix some issues reported by LGTM (#1478) * Declare local JavaScript variables (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Remove unused local JavaScript variable (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Puma Worker Configuration (#1332) We noticed that the current default settings perform very poorly under load. We managed to literally take down Greenlight during a larger event when people where accessing the landing page for rooms and when doing some tests, I was more or less able to DoS Greenlight on my own. This patch adds a default worker configuration which significantly improves the situation. The small, 4 core machine I was testing on could handle about thrice the amount of requests. While the new default configuration should be reasonably well suited for most deployments, this patch further allows users to easily configure the worker pool on their own in the environment file. * Made name and email readonly for no greenlight accounts (#1534) * Fixed hardcoded string (#1532) * fixed spelling error that was bugging me :) - sep a rat e (#1535) Co-authored-by: Dave Lane <dave@oerfoundation.org> * Improve Server Rooms View (#1524) * Order rooms by status * Cleaned up order function * Now displays Started/Created/Ended * Added participant count to rooms list * Fix rake task user:create so that users can be created when terms are present (#1565) * Changed user create task to always accept terms * clean up * More secure room ID (#1451) * Legal and privpolicy link (#1421) * add customizable Links to Imprint and Privacy Policy * fix copy&paste error in spec * replace "imprint" with "legal" since that is the correct term * remove german translation of new strings, transifex will take care of them later * GRN2-295:Refactored update profile and update password (#1591) * Refactored update profile and update password * Relowered rubocop settings * Fixed email sending when not supposed to (#1592) * Design changes for small screens (#1580) * now rap for pagination * Update _subtitle.html.erb * Update _rooms.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update _users.html.erb * Update cant_create_rooms.html.erb * Update room.js * Update edit.html.erb * Update new.html.erb * Update cant_create_rooms.html.erb * Update _sessions.html.erb * Update _account.html.erb * Make Greenlight work with Ruby 2.7 (#1560) Greenlight's failure to start up with Ruby 2.7 seems to be caused by [an issue in bootsnap](https://github.com/Shopify/bootsnap/issues/258). Updating that library makes Greenlight work again. However, there are still a lot of deprecation warnings. But that's something to deal with separately. This fixes #1558 * use email input for sign in (#1199) * use email input for sign in * use email input for registration * use email input for invitation * use email input for account settings Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix Gemfile (#1593) * Fixed invalid token for password reset (#1632) * HELP_URL env variable now works as expected (#1636) * #1372 Fix for long Text in Table + Remove invalid HTML Tag (#1403) * removed invalid HTML Tag * removed invalid HTML Tag * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _server_recording_row.html.erb form-inline replaced by own css * Update _server_room_row.html.erb * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _public_recording_row.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update main.scss fix for long text * Update main.scss * Update _public_recording_row.html.erb * Added more validation on profile image (#1644) * Users who can't create rooms but have shared rooms now have a different view (#1649) * Revert "Puma Worker Configuration (#1332)" (#1667) This reverts commit 78ed8d74601b613af3fd96ccf75a6bada24deddd. * Removed html safe from all flash messages (#1668) * Remove hardcoded guest=true if require mod approval is set (#1669) * Change random generation for room uid (#1670) * GRN2-290: Update gems and update to Rails 5.2.4.3 (#1671) * Update gems and update to Rails 5.2.4.3 * remove gemfile error Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: Florian Weber <fnwbr@users.noreply.github.com> Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Lars Kiesow <lkiesow@uos.de> Co-authored-by: Dave Lane <dave@lane.net.nz> Co-authored-by: Dave Lane <dave@oerfoundation.org> Co-authored-by: Henning <hng@users.noreply.github.com> Co-authored-by: Marcel Waldvogel <marcel@waldvogel.family> Co-authored-by: Christian Marg <marg@rz.tu-clausthal.de> Co-authored-by: Klaus <klaus@jsxc.org>
2020-05-26 17:37:23 -04:00
@admin.set_role :super_admin
expect(Rails.logger.level).to eq(0)
post :log_level, params: { value: 2 }
expect(Rails.logger.level).to eq(2)
end
end
context "POST permissions" do
it "allows a user with the correct permission to edit site settings" do
Role.create_new_role("test", "greenlight").update_all_role_permissions(can_edit_site_settings: true)
@user2 = create(:user)
Merge v2.6-alpha (#1672) * GRN2-xx: Switch the relation between users and roles to make queries cleaner and faster (#1299) * First steps * Fixes in account creation flow * Fixed most testcases * more test fixes * Fixed more test cases * Passing tests and rubocop * Added rake task to remove rooms * Adding translation (#1510) * Update _account.html.erb * Update en.yml * Fix "for" attribute for label elements (#1488) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix some issues reported by LGTM (#1478) * Declare local JavaScript variables (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Remove unused local JavaScript variable (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Puma Worker Configuration (#1332) We noticed that the current default settings perform very poorly under load. We managed to literally take down Greenlight during a larger event when people where accessing the landing page for rooms and when doing some tests, I was more or less able to DoS Greenlight on my own. This patch adds a default worker configuration which significantly improves the situation. The small, 4 core machine I was testing on could handle about thrice the amount of requests. While the new default configuration should be reasonably well suited for most deployments, this patch further allows users to easily configure the worker pool on their own in the environment file. * Made name and email readonly for no greenlight accounts (#1534) * Fixed hardcoded string (#1532) * fixed spelling error that was bugging me :) - sep a rat e (#1535) Co-authored-by: Dave Lane <dave@oerfoundation.org> * Improve Server Rooms View (#1524) * Order rooms by status * Cleaned up order function * Now displays Started/Created/Ended * Added participant count to rooms list * Fix rake task user:create so that users can be created when terms are present (#1565) * Changed user create task to always accept terms * clean up * More secure room ID (#1451) * Legal and privpolicy link (#1421) * add customizable Links to Imprint and Privacy Policy * fix copy&paste error in spec * replace "imprint" with "legal" since that is the correct term * remove german translation of new strings, transifex will take care of them later * GRN2-295:Refactored update profile and update password (#1591) * Refactored update profile and update password * Relowered rubocop settings * Fixed email sending when not supposed to (#1592) * Design changes for small screens (#1580) * now rap for pagination * Update _subtitle.html.erb * Update _rooms.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update _users.html.erb * Update cant_create_rooms.html.erb * Update room.js * Update edit.html.erb * Update new.html.erb * Update cant_create_rooms.html.erb * Update _sessions.html.erb * Update _account.html.erb * Make Greenlight work with Ruby 2.7 (#1560) Greenlight's failure to start up with Ruby 2.7 seems to be caused by [an issue in bootsnap](https://github.com/Shopify/bootsnap/issues/258). Updating that library makes Greenlight work again. However, there are still a lot of deprecation warnings. But that's something to deal with separately. This fixes #1558 * use email input for sign in (#1199) * use email input for sign in * use email input for registration * use email input for invitation * use email input for account settings Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix Gemfile (#1593) * Fixed invalid token for password reset (#1632) * HELP_URL env variable now works as expected (#1636) * #1372 Fix for long Text in Table + Remove invalid HTML Tag (#1403) * removed invalid HTML Tag * removed invalid HTML Tag * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _server_recording_row.html.erb form-inline replaced by own css * Update _server_room_row.html.erb * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _public_recording_row.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update main.scss fix for long text * Update main.scss * Update _public_recording_row.html.erb * Added more validation on profile image (#1644) * Users who can't create rooms but have shared rooms now have a different view (#1649) * Revert "Puma Worker Configuration (#1332)" (#1667) This reverts commit 78ed8d74601b613af3fd96ccf75a6bada24deddd. * Removed html safe from all flash messages (#1668) * Remove hardcoded guest=true if require mod approval is set (#1669) * Change random generation for room uid (#1670) * GRN2-290: Update gems and update to Rails 5.2.4.3 (#1671) * Update gems and update to Rails 5.2.4.3 * remove gemfile error Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: Florian Weber <fnwbr@users.noreply.github.com> Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Lars Kiesow <lkiesow@uos.de> Co-authored-by: Dave Lane <dave@lane.net.nz> Co-authored-by: Dave Lane <dave@oerfoundation.org> Co-authored-by: Henning <hng@users.noreply.github.com> Co-authored-by: Marcel Waldvogel <marcel@waldvogel.family> Co-authored-by: Christian Marg <marg@rz.tu-clausthal.de> Co-authored-by: Klaus <klaus@jsxc.org>
2020-05-26 17:37:23 -04:00
@user2.set_role(:test)
# Random edit site settings action test
@request.session[:user_id] = @user2.id
post :update_settings, params: { setting: "Shared Access", value: "false" }
feature = Setting.find_by(provider: "provider1").features.find_by(name: "Shared Access")
expect(feature[:value]).to eq("false")
Merge v2.7-alpha (#1951) * Fix wrong conditional (reported by LGTM) (#1477) Signed-off-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Bump rack from 2.2.2 to 2.2.3 (#1839) Bumps [rack](https://github.com/rack/rack) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v2.2.2...2.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [FIX] Unable to edit long recording names #1776 (#1780) * Allow to set a filter for LDAP authentication * [FIX] Unable to edit long recording names #1776 Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: farhatahmad <ahmad.af.farhat@gmail.com> * Desgin for Manage Users Tabs (#1777) * Update _subtitle.html.erb * Update _manage_users_tags.html.erb * Update admins.scss * Update _primary_themes.scss * Update _manage_users_tags.html.erb * Minor style changes to manage users (#1845) * Maintenance banner moved to admin site (#1775) * initial * finish * travis fixes * travis again * not required * Co-authored-by: Tobias Fiebig <t.fiebig@tudelft.nl> (#1296) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Enhance Room OpenGraph Metadata (#1601) * Revert "Enhance Room OpenGraph Metadata (#1601)" (#1852) This reverts commit 3b007c233ae12e0407f216ae269c63d6179f73b8. * GRN2-xx: Tab title now displays the current page name (#1853) * Tab title now displays the current page name * Added page title for the rest of the pages * Split Site Settings into 3 different tabs (#1858) * Split Site Settings into 3 different tabs * Fix copyright * Added redirect to correct tab * Make sure settings are displaying when they should * Update en.yml (#1857) * Build images for alpha branches (#1867) * Upgraded jquery to latest version (#1896) * Added favicon tag (#1898) * Fixed XSS issue with role name (#1899) * Update path for coloring redirect (#1908) * Added a fourth section to the room uid (#1910) * Fixed issue with insecure room sharing removal (#1914) * Fixes typo (#1917) Fixes typo: successfully was written incorrect. * Fixed order of rooms in server rooms (#1915) * Change default room sort to latest activity (#1919) * GRN2-xx: Small changes/improvements to the recording settings (#1851) * Small changes/improvements to the recording settings * Replaced room warning with info flash * Added global setting to enable/disable the recording consent feature * Replace Legal with Terms (#1931) * Added a more friendly OpenGraph description when invited to join a room (#1932) * Fixed issue causing maintenance banner not to hide correctly (#1933) * Hide recording menu and recording list when it is disabled (#1935) * Hide recording menu and recording list when it is disabled * Hide recording list when disabled * GRN2-xx: Added an auto-refresh after 2 mins while waiting for room to start (#1947) * Added an auto-refresh after 2 mins while waiting for room to start * Fixed random issue with test case * GRN2-xx: Added ability to preupload presentations to rooms (#1895) * Added ability to preupload presentations to rooms (#1868) * Added setting to site settings and allowed admins to change the presentation * Added AWS S3 and GCS Storage ENV variables * Added check to ensure file extension is correct * Added icon to remove presentation * Added testcases for preupload * Add nginx redirect to solve issue with relative root * Record title, instead of room name, in the popup (#1924) * Update _public_recording_row.html.erb * Update _recording_row.html.erb Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: beckerr-rzht <beckerr@hochschule-trier.de> Co-authored-by: François Ménabé <francois.menabe@unistra.fr> Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: yanosz <yanosz@users.noreply.github.com> Co-authored-by: Moritz Schlarb <moschlar@metalabs.de> Co-authored-by: chronikum <34622984+chronikum@users.noreply.github.com> Co-authored-by: Mitsutaka Sato <miztaka@honestyworks.jp> Co-authored-by: hiroshisuga <45039819+hiroshisuga@users.noreply.github.com>
2020-07-29 11:03:22 -04:00
expect(response).to redirect_to(admin_site_settings_path(tab: "settings"))
end
it "doesn't allow a user with the incorrect permission to edit site settings" do
Role.create_new_role("test", "greenlight").update_all_role_permissions(can_manage_users: true)
@user2 = create(:user)
Merge v2.6-alpha (#1672) * GRN2-xx: Switch the relation between users and roles to make queries cleaner and faster (#1299) * First steps * Fixes in account creation flow * Fixed most testcases * more test fixes * Fixed more test cases * Passing tests and rubocop * Added rake task to remove rooms * Adding translation (#1510) * Update _account.html.erb * Update en.yml * Fix "for" attribute for label elements (#1488) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix some issues reported by LGTM (#1478) * Declare local JavaScript variables (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Remove unused local JavaScript variable (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Puma Worker Configuration (#1332) We noticed that the current default settings perform very poorly under load. We managed to literally take down Greenlight during a larger event when people where accessing the landing page for rooms and when doing some tests, I was more or less able to DoS Greenlight on my own. This patch adds a default worker configuration which significantly improves the situation. The small, 4 core machine I was testing on could handle about thrice the amount of requests. While the new default configuration should be reasonably well suited for most deployments, this patch further allows users to easily configure the worker pool on their own in the environment file. * Made name and email readonly for no greenlight accounts (#1534) * Fixed hardcoded string (#1532) * fixed spelling error that was bugging me :) - sep a rat e (#1535) Co-authored-by: Dave Lane <dave@oerfoundation.org> * Improve Server Rooms View (#1524) * Order rooms by status * Cleaned up order function * Now displays Started/Created/Ended * Added participant count to rooms list * Fix rake task user:create so that users can be created when terms are present (#1565) * Changed user create task to always accept terms * clean up * More secure room ID (#1451) * Legal and privpolicy link (#1421) * add customizable Links to Imprint and Privacy Policy * fix copy&paste error in spec * replace "imprint" with "legal" since that is the correct term * remove german translation of new strings, transifex will take care of them later * GRN2-295:Refactored update profile and update password (#1591) * Refactored update profile and update password * Relowered rubocop settings * Fixed email sending when not supposed to (#1592) * Design changes for small screens (#1580) * now rap for pagination * Update _subtitle.html.erb * Update _rooms.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update _users.html.erb * Update cant_create_rooms.html.erb * Update room.js * Update edit.html.erb * Update new.html.erb * Update cant_create_rooms.html.erb * Update _sessions.html.erb * Update _account.html.erb * Make Greenlight work with Ruby 2.7 (#1560) Greenlight's failure to start up with Ruby 2.7 seems to be caused by [an issue in bootsnap](https://github.com/Shopify/bootsnap/issues/258). Updating that library makes Greenlight work again. However, there are still a lot of deprecation warnings. But that's something to deal with separately. This fixes #1558 * use email input for sign in (#1199) * use email input for sign in * use email input for registration * use email input for invitation * use email input for account settings Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix Gemfile (#1593) * Fixed invalid token for password reset (#1632) * HELP_URL env variable now works as expected (#1636) * #1372 Fix for long Text in Table + Remove invalid HTML Tag (#1403) * removed invalid HTML Tag * removed invalid HTML Tag * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _server_recording_row.html.erb form-inline replaced by own css * Update _server_room_row.html.erb * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _public_recording_row.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update main.scss fix for long text * Update main.scss * Update _public_recording_row.html.erb * Added more validation on profile image (#1644) * Users who can't create rooms but have shared rooms now have a different view (#1649) * Revert "Puma Worker Configuration (#1332)" (#1667) This reverts commit 78ed8d74601b613af3fd96ccf75a6bada24deddd. * Removed html safe from all flash messages (#1668) * Remove hardcoded guest=true if require mod approval is set (#1669) * Change random generation for room uid (#1670) * GRN2-290: Update gems and update to Rails 5.2.4.3 (#1671) * Update gems and update to Rails 5.2.4.3 * remove gemfile error Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: Florian Weber <fnwbr@users.noreply.github.com> Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Lars Kiesow <lkiesow@uos.de> Co-authored-by: Dave Lane <dave@lane.net.nz> Co-authored-by: Dave Lane <dave@oerfoundation.org> Co-authored-by: Henning <hng@users.noreply.github.com> Co-authored-by: Marcel Waldvogel <marcel@waldvogel.family> Co-authored-by: Christian Marg <marg@rz.tu-clausthal.de> Co-authored-by: Klaus <klaus@jsxc.org>
2020-05-26 17:37:23 -04:00
@user2.set_role(:test)
# Random edit site settings action test
@request.session[:user_id] = @user2.id
post :update_settings, params: { setting: "Shared Access", value: "false" }
expect(response).to render_template "errors/greenlight_error"
end
end
Admin panel (#496) * Added the administrator role and functionality that comes with it (#403) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * Update user.rb * Update admins.js * GRN-15: Added the ability to change color and image from admin interface (#425) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Update user.rb * Update user.rb * Update routes.rb * Update admins_controller.rb * GRN-87:Added a super admin role and made changes to how to the design works (#430) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * Update user.rb * Update themes_controller_spec.rb * Update routes.rb * Update admins_controller.rb * Removed duplicated code that broke the build after last merge * GRN-78: Restructured some of the views to make the UI more consistent and responsive (#435) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * GRN-78: Cleaned up buttons and moved signin to its own page * GRN-78: Moved the Rooms and Recordings link to nav bar * Merge fix * Views restructure fix (#458) * Added cache to gitlab-ci.yml * Restructured seed * GRN2-99 -> GRN2-106: UI cleanup and refactoring (#478) * GRN2-98: Change Fullname to Full name * GRN2-105: Changed View Users to Manage Users * GRN2-101/103: Updated email to match branding * GRN2-100: Updated Email Sent flash to be more descriptive * GRN2-104: Redirect user to sign in page w/ flash after clicking activation link * GRN2-102: Changed the wording in the verification email * GRN2-99: Added email form validation * GRN2-106: Cleaned up Users list front end * Fixes to rake and admin password validator for passing rubocop * GRN2-113: Fixed issues with admin panel (#479) * GRN2-116: Code clean up after restructure of views (#482) * Removed unused references * Rubocop * Added pagination to admin view (#483) * GRN2-114: Added the ability for admins to ban/unban users (#487) * Added the ability for admins to ban and unban users * Update sessions_helper.rb * Merge branch 'master' into admin-panel (#492) * Updated rubocop gem * Updated rubocop and fixed issues (#490) * Rubocop fixes * GRN2-122: Updated sign in flow for admins and switch design tab to site settings (#489) * Switched design tab to site settings * Update _header with spaces instead of tabs * Added more test cases to increase coverage (#494)
2019-05-03 13:05:12 -04:00
end
describe "Roles" do
context "GET #roles" do
it "should render the roles editor with the user role selected" do
@request.session[:user_id] = @admin.id
get :roles
expect(response).to render_template :roles
expect(assigns(:roles).count).to eq(2)
expect(assigns(:selected_role).name).to eq("user")
end
it "should render the roles editor with the request role selected" do
Role.create_default_roles("provider1")
new_role = Role.create(name: "test", provider: "provider1")
@request.session[:user_id] = @admin.id
get :roles, params: { selected_role: new_role.id }
expect(response).to render_template :roles
expect(assigns(:roles).count).to eq(3)
expect(assigns(:selected_role).name).to eq(new_role.name)
end
end
context "POST #new_role" do
before do
Role.create_default_roles("provider1")
end
it "should fail with duplicate role name" do
@request.session[:user_id] = @admin.id
post :new_role, params: { role: { name: "admin" } }
expect(response).to redirect_to admin_roles_path
expect(flash[:alert]).to eq(I18n.t("administrator.roles.invalid_create"))
end
it "should fail with empty role name" do
@request.session[:user_id] = @admin.id
post :new_role, params: { role: { name: " " } }
expect(response).to redirect_to admin_roles_path
expect(flash[:alert]).to eq(I18n.t("administrator.roles.invalid_create"))
end
it "should create new role and increase user role priority" do
@request.session[:user_id] = @admin.id
post :new_role, params: { role: { name: "test" } }
new_role = Role.find_by(name: "test", provider: "provider1")
user_role = Role.find_by(name: "user", provider: "provider1")
expect(new_role.priority).to eq(1)
expect(user_role.priority).to eq(2)
expect(response).to redirect_to admin_roles_path(selected_role: new_role.id)
end
end
context "PATCH #change_role_order" do
before do
Role.create_default_roles("provider1")
@user.roles.delete(Role.find_by(name: "user", provider: "greenlight"))
end
it "should fail if user attempts to change the order of the admin or user roles" do
@request.session[:user_id] = @admin.id
user_role = Role.find_by(name: "user", provider: "provider1")
admin_role = Role.find_by(name: "admin", provider: "provider1")
patch :change_role_order, params: { role: [user_role.id, admin_role.id] }
expect(flash[:alert]).to eq(I18n.t("administrator.roles.invalid_order"))
expect(response).to redirect_to admin_roles_path
end
it "should fail if a user attempts to edit a role with a higher priority than their own" do
new_role3 = Role.create_new_role("test3", "provider1")
new_role2 = Role.create_new_role("test2", "provider1")
new_role2.update_permission("can_edit_roles", "true")
Merge v2.6-alpha (#1672) * GRN2-xx: Switch the relation between users and roles to make queries cleaner and faster (#1299) * First steps * Fixes in account creation flow * Fixed most testcases * more test fixes * Fixed more test cases * Passing tests and rubocop * Added rake task to remove rooms * Adding translation (#1510) * Update _account.html.erb * Update en.yml * Fix "for" attribute for label elements (#1488) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix some issues reported by LGTM (#1478) * Declare local JavaScript variables (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Remove unused local JavaScript variable (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Puma Worker Configuration (#1332) We noticed that the current default settings perform very poorly under load. We managed to literally take down Greenlight during a larger event when people where accessing the landing page for rooms and when doing some tests, I was more or less able to DoS Greenlight on my own. This patch adds a default worker configuration which significantly improves the situation. The small, 4 core machine I was testing on could handle about thrice the amount of requests. While the new default configuration should be reasonably well suited for most deployments, this patch further allows users to easily configure the worker pool on their own in the environment file. * Made name and email readonly for no greenlight accounts (#1534) * Fixed hardcoded string (#1532) * fixed spelling error that was bugging me :) - sep a rat e (#1535) Co-authored-by: Dave Lane <dave@oerfoundation.org> * Improve Server Rooms View (#1524) * Order rooms by status * Cleaned up order function * Now displays Started/Created/Ended * Added participant count to rooms list * Fix rake task user:create so that users can be created when terms are present (#1565) * Changed user create task to always accept terms * clean up * More secure room ID (#1451) * Legal and privpolicy link (#1421) * add customizable Links to Imprint and Privacy Policy * fix copy&paste error in spec * replace "imprint" with "legal" since that is the correct term * remove german translation of new strings, transifex will take care of them later * GRN2-295:Refactored update profile and update password (#1591) * Refactored update profile and update password * Relowered rubocop settings * Fixed email sending when not supposed to (#1592) * Design changes for small screens (#1580) * now rap for pagination * Update _subtitle.html.erb * Update _rooms.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update _users.html.erb * Update cant_create_rooms.html.erb * Update room.js * Update edit.html.erb * Update new.html.erb * Update cant_create_rooms.html.erb * Update _sessions.html.erb * Update _account.html.erb * Make Greenlight work with Ruby 2.7 (#1560) Greenlight's failure to start up with Ruby 2.7 seems to be caused by [an issue in bootsnap](https://github.com/Shopify/bootsnap/issues/258). Updating that library makes Greenlight work again. However, there are still a lot of deprecation warnings. But that's something to deal with separately. This fixes #1558 * use email input for sign in (#1199) * use email input for sign in * use email input for registration * use email input for invitation * use email input for account settings Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix Gemfile (#1593) * Fixed invalid token for password reset (#1632) * HELP_URL env variable now works as expected (#1636) * #1372 Fix for long Text in Table + Remove invalid HTML Tag (#1403) * removed invalid HTML Tag * removed invalid HTML Tag * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _server_recording_row.html.erb form-inline replaced by own css * Update _server_room_row.html.erb * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _public_recording_row.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update main.scss fix for long text * Update main.scss * Update _public_recording_row.html.erb * Added more validation on profile image (#1644) * Users who can't create rooms but have shared rooms now have a different view (#1649) * Revert "Puma Worker Configuration (#1332)" (#1667) This reverts commit 78ed8d74601b613af3fd96ccf75a6bada24deddd. * Removed html safe from all flash messages (#1668) * Remove hardcoded guest=true if require mod approval is set (#1669) * Change random generation for room uid (#1670) * GRN2-290: Update gems and update to Rails 5.2.4.3 (#1671) * Update gems and update to Rails 5.2.4.3 * remove gemfile error Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: Florian Weber <fnwbr@users.noreply.github.com> Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Lars Kiesow <lkiesow@uos.de> Co-authored-by: Dave Lane <dave@lane.net.nz> Co-authored-by: Dave Lane <dave@oerfoundation.org> Co-authored-by: Henning <hng@users.noreply.github.com> Co-authored-by: Marcel Waldvogel <marcel@waldvogel.family> Co-authored-by: Christian Marg <marg@rz.tu-clausthal.de> Co-authored-by: Klaus <klaus@jsxc.org>
2020-05-26 17:37:23 -04:00
@user.role = new_role2
@user.save!
@request.session[:user_id] = @user.id
patch :change_role_order, params: { role: [new_role3.id, new_role2.id] }
expect(flash[:alert]).to eq(I18n.t("administrator.roles.invalid_order"))
expect(response).to redirect_to admin_roles_path
end
it "should update the role order" do
user_role = Role.find_by(name: "user", provider: "provider1")
user_role.update_attribute(:priority, 4)
new_role1 = Role.create(name: "test1", priority: 1, provider: "provider1")
new_role2 = Role.create(name: "test2", priority: 2, provider: "provider1")
new_role3 = Role.create(name: "test3", priority: 3, provider: "provider1")
@request.session[:user_id] = @admin.id
patch :change_role_order, params: { role: [new_role3.id, new_role2.id, new_role1.id] }
new_role1.reload
new_role2.reload
new_role3.reload
user_role.reload
expect(new_role3.priority).to eq(1)
expect(new_role2.priority).to eq(2)
expect(new_role1.priority).to eq(3)
expect(user_role.priority).to eq(4)
end
end
context 'POST #update_role' do
before do
Role.create_default_roles("provider1")
@user.roles.delete(Role.find_by(name: "user", provider: "greenlight"))
end
it "should fail to update a role with a lower priority than the user" do
user_role = Role.find_by(name: "user", provider: "provider1")
user_role.update_attribute(:priority, 3)
new_role1 = Role.create(name: "test1", priority: 1, provider: "provider1")
new_role2 = Role.create(name: "test2", priority: 2, provider: "provider1")
new_role2.update_permission("can_edit_roles", "true")
Merge v2.6-alpha (#1672) * GRN2-xx: Switch the relation between users and roles to make queries cleaner and faster (#1299) * First steps * Fixes in account creation flow * Fixed most testcases * more test fixes * Fixed more test cases * Passing tests and rubocop * Added rake task to remove rooms * Adding translation (#1510) * Update _account.html.erb * Update en.yml * Fix "for" attribute for label elements (#1488) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix some issues reported by LGTM (#1478) * Declare local JavaScript variables (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Remove unused local JavaScript variable (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Puma Worker Configuration (#1332) We noticed that the current default settings perform very poorly under load. We managed to literally take down Greenlight during a larger event when people where accessing the landing page for rooms and when doing some tests, I was more or less able to DoS Greenlight on my own. This patch adds a default worker configuration which significantly improves the situation. The small, 4 core machine I was testing on could handle about thrice the amount of requests. While the new default configuration should be reasonably well suited for most deployments, this patch further allows users to easily configure the worker pool on their own in the environment file. * Made name and email readonly for no greenlight accounts (#1534) * Fixed hardcoded string (#1532) * fixed spelling error that was bugging me :) - sep a rat e (#1535) Co-authored-by: Dave Lane <dave@oerfoundation.org> * Improve Server Rooms View (#1524) * Order rooms by status * Cleaned up order function * Now displays Started/Created/Ended * Added participant count to rooms list * Fix rake task user:create so that users can be created when terms are present (#1565) * Changed user create task to always accept terms * clean up * More secure room ID (#1451) * Legal and privpolicy link (#1421) * add customizable Links to Imprint and Privacy Policy * fix copy&paste error in spec * replace "imprint" with "legal" since that is the correct term * remove german translation of new strings, transifex will take care of them later * GRN2-295:Refactored update profile and update password (#1591) * Refactored update profile and update password * Relowered rubocop settings * Fixed email sending when not supposed to (#1592) * Design changes for small screens (#1580) * now rap for pagination * Update _subtitle.html.erb * Update _rooms.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update _users.html.erb * Update cant_create_rooms.html.erb * Update room.js * Update edit.html.erb * Update new.html.erb * Update cant_create_rooms.html.erb * Update _sessions.html.erb * Update _account.html.erb * Make Greenlight work with Ruby 2.7 (#1560) Greenlight's failure to start up with Ruby 2.7 seems to be caused by [an issue in bootsnap](https://github.com/Shopify/bootsnap/issues/258). Updating that library makes Greenlight work again. However, there are still a lot of deprecation warnings. But that's something to deal with separately. This fixes #1558 * use email input for sign in (#1199) * use email input for sign in * use email input for registration * use email input for invitation * use email input for account settings Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix Gemfile (#1593) * Fixed invalid token for password reset (#1632) * HELP_URL env variable now works as expected (#1636) * #1372 Fix for long Text in Table + Remove invalid HTML Tag (#1403) * removed invalid HTML Tag * removed invalid HTML Tag * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _server_recording_row.html.erb form-inline replaced by own css * Update _server_room_row.html.erb * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _public_recording_row.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update main.scss fix for long text * Update main.scss * Update _public_recording_row.html.erb * Added more validation on profile image (#1644) * Users who can't create rooms but have shared rooms now have a different view (#1649) * Revert "Puma Worker Configuration (#1332)" (#1667) This reverts commit 78ed8d74601b613af3fd96ccf75a6bada24deddd. * Removed html safe from all flash messages (#1668) * Remove hardcoded guest=true if require mod approval is set (#1669) * Change random generation for room uid (#1670) * GRN2-290: Update gems and update to Rails 5.2.4.3 (#1671) * Update gems and update to Rails 5.2.4.3 * remove gemfile error Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: Florian Weber <fnwbr@users.noreply.github.com> Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Lars Kiesow <lkiesow@uos.de> Co-authored-by: Dave Lane <dave@lane.net.nz> Co-authored-by: Dave Lane <dave@oerfoundation.org> Co-authored-by: Henning <hng@users.noreply.github.com> Co-authored-by: Marcel Waldvogel <marcel@waldvogel.family> Co-authored-by: Christian Marg <marg@rz.tu-clausthal.de> Co-authored-by: Klaus <klaus@jsxc.org>
2020-05-26 17:37:23 -04:00
@user.role = new_role2
@user.save!
@request.session[:user_id] = @user.id
patch :update_role, params: { role_id: new_role1.id }
expect(flash[:alert]).to eq(I18n.t("administrator.roles.invalid_update"))
expect(response).to redirect_to admin_roles_path(selected_role: new_role1.id)
end
it "should fail to update if there is a duplicate name" do
new_role = Role.create(name: "test2", priority: 2, provider: "provider1")
new_role.update_permission("can_edit_roles", "true")
@request.session[:user_id] = @admin.id
patch :update_role, params: { role_id: new_role.id, role: { name: "admin" } }
expect(flash[:alert]).to eq(I18n.t("administrator.roles.invalid_update"))
expect(response).to redirect_to admin_roles_path(selected_role: new_role.id)
end
it "should update role permisions" do
new_role = Role.create(name: "test2", priority: 2, provider: "provider1")
new_role.update_permission("can_edit_roles", "true")
@request.session[:user_id] = @admin.id
patch :update_role, params: { role_id: new_role.id, role: { name: "test", can_edit_roles: false,
colour: "#45434", can_manage_users: true } }
new_role.reload
expect(new_role.name).to eq("test")
expect(new_role.get_permission("can_edit_roles")).to eq(false)
expect(new_role.colour).to eq("#45434")
expect(new_role.get_permission("can_manage_users")).to eq(true)
expect(new_role.get_permission("send_promoted_email")).to eq(false)
expect(response).to redirect_to admin_roles_path(selected_role: new_role.id)
end
it "creates the users home room if can_create_rooms is enabled" do
new_role = Role.create(name: "test2", priority: 2, provider: "provider1")
new_role.update_permission("can_create_rooms", "false")
@request.session[:user_id] = @admin.id
new_user = create(:user, role: new_role)
expect(new_user.role.get_permission("can_create_rooms")).to eq(false)
expect(new_user.main_room).to be_nil
patch :update_role, params: { role_id: new_role.id, role: { name: "test", can_create_rooms: true,
colour: "#45434" } }
new_user.reload
expect(new_user.role.get_permission("can_create_rooms")).to eq(true)
expect(new_user.main_room).not_to be_nil
end
end
context "DELETE delete_role" do
before do
Role.create_default_roles("provider1")
end
it "should fail to delete the role if it has users assigned to it" do
admin_role = Role.find_by(name: "admin", provider: "greenlight")
@request.session[:user_id] = @admin.id
delete :delete_role, params: { role_id: admin_role.id }
expect(flash[:alert]).to eq(I18n.t("administrator.roles.role_has_users", user_count: 1))
expect(response).to redirect_to admin_roles_path(selected_role: admin_role.id)
end
it "should fail to delete the role if it is a default role" do
pending_role = Role.find_by(name: "pending", provider: "provider1")
@request.session[:user_id] = @admin.id
delete :delete_role, params: { role_id: pending_role.id }
expect(response).to redirect_to admin_roles_path(selected_role: pending_role.id)
end
it "should successfully delete the role" do
new_role = Role.create(name: "test2", priority: 2, provider: "provider1")
new_role.update_permission("can_edit_roles", "true")
@request.session[:user_id] = @admin.id
delete :delete_role, params: { role_id: new_role.id }
expect(Role.where(name: "test2", provider: "provider1").count).to eq(0)
expect(response).to redirect_to admin_roles_path
end
end
context "POST permissions" do
it "allows a user with the correct permission to edit roles" do
Role.create_new_role("test", "greenlight").update_all_role_permissions(can_edit_roles: true)
@user2 = create(:user)
Merge v2.6-alpha (#1672) * GRN2-xx: Switch the relation between users and roles to make queries cleaner and faster (#1299) * First steps * Fixes in account creation flow * Fixed most testcases * more test fixes * Fixed more test cases * Passing tests and rubocop * Added rake task to remove rooms * Adding translation (#1510) * Update _account.html.erb * Update en.yml * Fix "for" attribute for label elements (#1488) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix some issues reported by LGTM (#1478) * Declare local JavaScript variables (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Remove unused local JavaScript variable (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Puma Worker Configuration (#1332) We noticed that the current default settings perform very poorly under load. We managed to literally take down Greenlight during a larger event when people where accessing the landing page for rooms and when doing some tests, I was more or less able to DoS Greenlight on my own. This patch adds a default worker configuration which significantly improves the situation. The small, 4 core machine I was testing on could handle about thrice the amount of requests. While the new default configuration should be reasonably well suited for most deployments, this patch further allows users to easily configure the worker pool on their own in the environment file. * Made name and email readonly for no greenlight accounts (#1534) * Fixed hardcoded string (#1532) * fixed spelling error that was bugging me :) - sep a rat e (#1535) Co-authored-by: Dave Lane <dave@oerfoundation.org> * Improve Server Rooms View (#1524) * Order rooms by status * Cleaned up order function * Now displays Started/Created/Ended * Added participant count to rooms list * Fix rake task user:create so that users can be created when terms are present (#1565) * Changed user create task to always accept terms * clean up * More secure room ID (#1451) * Legal and privpolicy link (#1421) * add customizable Links to Imprint and Privacy Policy * fix copy&paste error in spec * replace "imprint" with "legal" since that is the correct term * remove german translation of new strings, transifex will take care of them later * GRN2-295:Refactored update profile and update password (#1591) * Refactored update profile and update password * Relowered rubocop settings * Fixed email sending when not supposed to (#1592) * Design changes for small screens (#1580) * now rap for pagination * Update _subtitle.html.erb * Update _rooms.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update _users.html.erb * Update cant_create_rooms.html.erb * Update room.js * Update edit.html.erb * Update new.html.erb * Update cant_create_rooms.html.erb * Update _sessions.html.erb * Update _account.html.erb * Make Greenlight work with Ruby 2.7 (#1560) Greenlight's failure to start up with Ruby 2.7 seems to be caused by [an issue in bootsnap](https://github.com/Shopify/bootsnap/issues/258). Updating that library makes Greenlight work again. However, there are still a lot of deprecation warnings. But that's something to deal with separately. This fixes #1558 * use email input for sign in (#1199) * use email input for sign in * use email input for registration * use email input for invitation * use email input for account settings Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix Gemfile (#1593) * Fixed invalid token for password reset (#1632) * HELP_URL env variable now works as expected (#1636) * #1372 Fix for long Text in Table + Remove invalid HTML Tag (#1403) * removed invalid HTML Tag * removed invalid HTML Tag * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _server_recording_row.html.erb form-inline replaced by own css * Update _server_room_row.html.erb * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _public_recording_row.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update main.scss fix for long text * Update main.scss * Update _public_recording_row.html.erb * Added more validation on profile image (#1644) * Users who can't create rooms but have shared rooms now have a different view (#1649) * Revert "Puma Worker Configuration (#1332)" (#1667) This reverts commit 78ed8d74601b613af3fd96ccf75a6bada24deddd. * Removed html safe from all flash messages (#1668) * Remove hardcoded guest=true if require mod approval is set (#1669) * Change random generation for room uid (#1670) * GRN2-290: Update gems and update to Rails 5.2.4.3 (#1671) * Update gems and update to Rails 5.2.4.3 * remove gemfile error Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: Florian Weber <fnwbr@users.noreply.github.com> Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Lars Kiesow <lkiesow@uos.de> Co-authored-by: Dave Lane <dave@lane.net.nz> Co-authored-by: Dave Lane <dave@oerfoundation.org> Co-authored-by: Henning <hng@users.noreply.github.com> Co-authored-by: Marcel Waldvogel <marcel@waldvogel.family> Co-authored-by: Christian Marg <marg@rz.tu-clausthal.de> Co-authored-by: Klaus <klaus@jsxc.org>
2020-05-26 17:37:23 -04:00
@user2.set_role(:test)
# Random edit roles action test
new_role = Role.create(name: "test2", priority: 2, provider: "provider1")
new_role.update_permission("can_edit_roles", "true")
@request.session[:user_id] = @user2.id
patch :update_role, params: { role_id: new_role.id, role: { name: "test3", can_edit_roles: false,
colour: "#45434", can_manage_users: true } }
new_role.reload
expect(new_role.name).to eq("test3")
expect(response).to redirect_to admin_roles_path(selected_role: new_role.id)
end
it "doesn't allow a user with the incorrect permission to edit roles" do
Role.create_new_role("test", "greenlight").update_all_role_permissions(can_manage_users: false)
@user2 = create(:user)
Merge v2.6-alpha (#1672) * GRN2-xx: Switch the relation between users and roles to make queries cleaner and faster (#1299) * First steps * Fixes in account creation flow * Fixed most testcases * more test fixes * Fixed more test cases * Passing tests and rubocop * Added rake task to remove rooms * Adding translation (#1510) * Update _account.html.erb * Update en.yml * Fix "for" attribute for label elements (#1488) Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix some issues reported by LGTM (#1478) * Declare local JavaScript variables (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Remove unused local JavaScript variable (reported by LGTM) Signed-off-by: Stefan Weil <sw@weilnetz.de> * Puma Worker Configuration (#1332) We noticed that the current default settings perform very poorly under load. We managed to literally take down Greenlight during a larger event when people where accessing the landing page for rooms and when doing some tests, I was more or less able to DoS Greenlight on my own. This patch adds a default worker configuration which significantly improves the situation. The small, 4 core machine I was testing on could handle about thrice the amount of requests. While the new default configuration should be reasonably well suited for most deployments, this patch further allows users to easily configure the worker pool on their own in the environment file. * Made name and email readonly for no greenlight accounts (#1534) * Fixed hardcoded string (#1532) * fixed spelling error that was bugging me :) - sep a rat e (#1535) Co-authored-by: Dave Lane <dave@oerfoundation.org> * Improve Server Rooms View (#1524) * Order rooms by status * Cleaned up order function * Now displays Started/Created/Ended * Added participant count to rooms list * Fix rake task user:create so that users can be created when terms are present (#1565) * Changed user create task to always accept terms * clean up * More secure room ID (#1451) * Legal and privpolicy link (#1421) * add customizable Links to Imprint and Privacy Policy * fix copy&paste error in spec * replace "imprint" with "legal" since that is the correct term * remove german translation of new strings, transifex will take care of them later * GRN2-295:Refactored update profile and update password (#1591) * Refactored update profile and update password * Relowered rubocop settings * Fixed email sending when not supposed to (#1592) * Design changes for small screens (#1580) * now rap for pagination * Update _subtitle.html.erb * Update _rooms.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update _users.html.erb * Update cant_create_rooms.html.erb * Update room.js * Update edit.html.erb * Update new.html.erb * Update cant_create_rooms.html.erb * Update _sessions.html.erb * Update _account.html.erb * Make Greenlight work with Ruby 2.7 (#1560) Greenlight's failure to start up with Ruby 2.7 seems to be caused by [an issue in bootsnap](https://github.com/Shopify/bootsnap/issues/258). Updating that library makes Greenlight work again. However, there are still a lot of deprecation warnings. But that's something to deal with separately. This fixes #1558 * use email input for sign in (#1199) * use email input for sign in * use email input for registration * use email input for invitation * use email input for account settings Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> * Fix Gemfile (#1593) * Fixed invalid token for password reset (#1632) * HELP_URL env variable now works as expected (#1636) * #1372 Fix for long Text in Table + Remove invalid HTML Tag (#1403) * removed invalid HTML Tag * removed invalid HTML Tag * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _server_recording_row.html.erb form-inline replaced by own css * Update _server_room_row.html.erb * Update _public_recording_row.html.erb * Update _recording_row.html.erb * Update _public_recording_row.html.erb * Update _recordings.html.erb * Update _rooms.html.erb * Update main.scss fix for long text * Update main.scss * Update _public_recording_row.html.erb * Added more validation on profile image (#1644) * Users who can't create rooms but have shared rooms now have a different view (#1649) * Revert "Puma Worker Configuration (#1332)" (#1667) This reverts commit 78ed8d74601b613af3fd96ccf75a6bada24deddd. * Removed html safe from all flash messages (#1668) * Remove hardcoded guest=true if require mod approval is set (#1669) * Change random generation for room uid (#1670) * GRN2-290: Update gems and update to Rails 5.2.4.3 (#1671) * Update gems and update to Rails 5.2.4.3 * remove gemfile error Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com> Co-authored-by: Florian Weber <fnwbr@users.noreply.github.com> Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Lars Kiesow <lkiesow@uos.de> Co-authored-by: Dave Lane <dave@lane.net.nz> Co-authored-by: Dave Lane <dave@oerfoundation.org> Co-authored-by: Henning <hng@users.noreply.github.com> Co-authored-by: Marcel Waldvogel <marcel@waldvogel.family> Co-authored-by: Christian Marg <marg@rz.tu-clausthal.de> Co-authored-by: Klaus <klaus@jsxc.org>
2020-05-26 17:37:23 -04:00
@user2.set_role(:test)
# Random edit roles action test
new_role = Role.create(name: "test2", priority: 2, provider: "provider1")
new_role.update_permission("can_edit_roles", "true")
@request.session[:user_id] = @user2.id
patch :update_role, params: { role_id: new_role.id, role: { name: "test3", can_edit_roles: false,
colour: "#45434", can_manage_users: true } }
expect(response).to render_template "errors/greenlight_error"
end
end
end
Admin panel (#496) * Added the administrator role and functionality that comes with it (#403) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * Update user.rb * Update admins.js * GRN-15: Added the ability to change color and image from admin interface (#425) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Update user.rb * Update user.rb * Update routes.rb * Update admins_controller.rb * GRN-87:Added a super admin role and made changes to how to the design works (#430) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * Update user.rb * Update themes_controller_spec.rb * Update routes.rb * Update admins_controller.rb * Removed duplicated code that broke the build after last merge * GRN-78: Restructured some of the views to make the UI more consistent and responsive (#435) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * GRN-78: Cleaned up buttons and moved signin to its own page * GRN-78: Moved the Rooms and Recordings link to nav bar * Merge fix * Views restructure fix (#458) * Added cache to gitlab-ci.yml * Restructured seed * GRN2-99 -> GRN2-106: UI cleanup and refactoring (#478) * GRN2-98: Change Fullname to Full name * GRN2-105: Changed View Users to Manage Users * GRN2-101/103: Updated email to match branding * GRN2-100: Updated Email Sent flash to be more descriptive * GRN2-104: Redirect user to sign in page w/ flash after clicking activation link * GRN2-102: Changed the wording in the verification email * GRN2-99: Added email form validation * GRN2-106: Cleaned up Users list front end * Fixes to rake and admin password validator for passing rubocop * GRN2-113: Fixed issues with admin panel (#479) * GRN2-116: Code clean up after restructure of views (#482) * Removed unused references * Rubocop * Added pagination to admin view (#483) * GRN2-114: Added the ability for admins to ban/unban users (#487) * Added the ability for admins to ban and unban users * Update sessions_helper.rb * Merge branch 'master' into admin-panel (#492) * Updated rubocop gem * Updated rubocop and fixed issues (#490) * Rubocop fixes * GRN2-122: Updated sign in flow for admins and switch design tab to site settings (#489) * Switched design tab to site settings * Update _header with spaces instead of tabs * Added more test cases to increase coverage (#494)
2019-05-03 13:05:12 -04:00
end