forked from External/greenlight
GRN2-180: First stages of refactoring code for v2.4 (#748)
* Email rescues and authenticator concern * Application controller and helper clean up * Moved controller code out of helpers * More helper and email clean up * Cleaned up remaining helpers and create omniauth_options * Controller code clean up * restructured views structure * Restructured role code * Restructured profile and code clean up * Master merge * Added bbb server concern to deal with bbb calls * Bug fixes and changes after changes * rspec * More rubocop fixes
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'office365'
|
||||
require 'omniauth_options'
|
||||
|
||||
include OmniauthOptions
|
||||
|
||||
# List of supported Omniauth providers.
|
||||
Rails.application.config.providers = []
|
||||
@ -16,7 +19,7 @@ Rails.application.config.omniauth_office365 = ENV['OFFICE365_KEY'].present? &&
|
||||
ENV['OFFICE365_SECRET'].present?
|
||||
|
||||
SETUP_PROC = lambda do |env|
|
||||
SessionsController.helpers.omniauth_options env
|
||||
OmniauthOptions.omniauth_options env
|
||||
end
|
||||
|
||||
OmniAuth.config.logger = Rails.logger
|
||||
|
@ -88,10 +88,9 @@ en:
|
||||
roles:
|
||||
can_create_rooms: Can create rooms
|
||||
delete: Delete the role
|
||||
duplicate_name: The role name you provided was a duplicate. All role names must be unique
|
||||
empty_name: All roles must have a non empty name
|
||||
invalid_order: The user role must be the lowest priority role and the admin role must be the highest priority role
|
||||
invalid_update: You can't update a role with a higher priority than your own role
|
||||
invalid_create: There was a problem creating a new role. Please check the role values and try again
|
||||
invalid_order: There was a problem updating the priority of the role. Please check the values and try again
|
||||
invalid_update: There was a problem updating the permissions of the role. Please check the values and try again
|
||||
name: Role Name
|
||||
new_role: Create a new role
|
||||
role_has_users: This role is assigned to %{user_count} accounts. Please remove all accounts from this role before deleting it.
|
||||
@ -101,8 +100,7 @@ en:
|
||||
edit_site_settings: Allow users with this role to edit site settings
|
||||
edit_roles: Allow users with this role to edit other roles
|
||||
manage_users: Allow users with this role to manage users
|
||||
invalid_assignment: You can't assign a role with a higher priority than your own to a user
|
||||
invalid_removal: You can't remove a role with a higher priority than your own
|
||||
invalid_assignment: There was a problem assigning the roles to the user. Please check the values and try again
|
||||
colour:
|
||||
title: Role Colour
|
||||
info: Set the colour that will be associated with the role
|
||||
|
@ -37,25 +37,23 @@ Rails.application.routes.draw do
|
||||
resources :admins, only: [:index]
|
||||
|
||||
scope '/admins' do
|
||||
get '/site_settings', to: 'admins#site_settings', as: :admin_site_settings
|
||||
# Panel Tabs
|
||||
get '/recordings', to: 'admins#server_recordings', as: :admin_recordings
|
||||
post '/branding', to: 'admins#branding', as: :admin_branding
|
||||
post '/coloring', to: 'admins#coloring', as: :admin_coloring
|
||||
post '/room_authentication', to: 'admins#room_authentication', as: :admin_room_authentication
|
||||
post '/coloring_lighten', to: 'admins#coloring_lighten', as: :admin_coloring_lighten
|
||||
post '/coloring_darken', to: 'admins#coloring_darken', as: :admin_coloring_darken
|
||||
post '/signup', to: 'admins#signup', as: :admin_signup
|
||||
get '/site_settings', to: 'admins#site_settings', as: :admin_site_settings
|
||||
get '/roles', to: 'admins#roles', as: :admin_roles
|
||||
# Manage Users
|
||||
get '/edit/:user_uid', to: 'admins#edit_user', as: :admin_edit_user
|
||||
post '/ban/:user_uid', to: 'admins#ban_user', as: :admin_ban
|
||||
post '/unban/:user_uid', to: 'admins#unban_user', as: :admin_unban
|
||||
post '/invite', to: 'admins#invite', as: :invite_user
|
||||
post '/registration_method/:method', to: 'admins#registration_method', as: :admin_change_registration
|
||||
post '/approve/:user_uid', to: 'admins#approve', as: :admin_approve
|
||||
get '/reset', to: 'admins#reset', as: :admin_reset
|
||||
post '/room_limit', to: 'admins#room_limit', as: :admin_room_limit
|
||||
post '/default_recording_visibility', to: 'admins#default_recording_visibility', as: :admin_recording_visibility
|
||||
# Site Settings
|
||||
post '/update_settings', to: 'admins#update_settings', as: :admin_update_settings
|
||||
post '/registration_method', to: 'admins#registration_method', as: :admin_change_registration
|
||||
post '/coloring', to: 'admins#coloring', as: :admin_coloring
|
||||
post '/clear_cache', to: 'admins#clear_cache', as: :admin_clear_cache
|
||||
get '/roles', to: 'admins#roles', as: :admin_roles
|
||||
# Roles
|
||||
post '/role', to: 'admins#new_role', as: :admin_new_role
|
||||
patch 'roles/order', to: 'admins#change_role_order', as: :admin_roles_order
|
||||
post '/role/:role_id', to: 'admins#update_role', as: :admin_update_role
|
||||
@ -86,6 +84,8 @@ Rails.application.routes.draw do
|
||||
|
||||
# Account management.
|
||||
get '/:user_uid/edit', to: 'users#edit', as: :edit_user
|
||||
get '/:user_uid/change_password', to: 'users#change_password', as: :change_password
|
||||
get '/:user_uid/delete_account', to: 'users#delete_account', as: :delete_account
|
||||
patch '/:user_uid/edit', to: 'users#update', as: :update_user
|
||||
delete '/:user_uid', to: 'users#destroy', as: :delete_user
|
||||
|
||||
@ -118,8 +118,8 @@ Rails.application.routes.draw do
|
||||
scope '/:meetingID' do
|
||||
# Manage recordings
|
||||
scope '/:record_id' do
|
||||
post '/', to: 'recordings#update_recording', as: :update_recording
|
||||
delete '/', to: 'recordings#delete_recording', as: :delete_recording
|
||||
post '/', to: 'recordings#update', as: :update_recording
|
||||
delete '/', to: 'recordings#delete', as: :delete_recording
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user