Skip to content

Commit

Permalink
DBP-813 Merge latest from upstream/ics
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncolincap committed Jun 4, 2024
2 parents ffb1842 + baab248 commit 8b3bdd5
Show file tree
Hide file tree
Showing 18 changed files with 129 additions and 126 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '>= 3.0'

gem 'active_model_serializers', '>= 0.10.14'
gem 'active_storage_validations', '>= 1.1.0'
gem 'active_storage_validations', '>= 1.0.4'
gem 'aws-sdk-s3', require: false
gem 'bcrypt', '~> 3.1.7'
gem 'bigbluebutton-api-ruby', '1.9.1'
Expand All @@ -29,7 +29,7 @@ gem 'omniauth-rails_csrf_protection', '~> 1.0.1'
gem 'pagy', '~> 6.0', '>= 6.0.0'
gem 'pg'
gem 'puma', '~> 5.6'
gem 'rails', '~> 7.1.1'
gem 'rails', '~> 7.1.0'
gem 'redis', '~> 4.0'
gem 'sprockets-rails'
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
Expand Down
129 changes: 63 additions & 66 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (7.1.1)
actionpack (= 7.1.1)
activesupport (= 7.1.1)
actioncable (7.1.0)
actionpack (= 7.1.0)
activesupport (= 7.1.0)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.1)
actionpack (= 7.1.1)
activejob (= 7.1.1)
activerecord (= 7.1.1)
activestorage (= 7.1.1)
activesupport (= 7.1.1)
actionmailbox (7.1.0)
actionpack (= 7.1.0)
activejob (= 7.1.0)
activerecord (= 7.1.0)
activestorage (= 7.1.0)
activesupport (= 7.1.0)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.1)
actionpack (= 7.1.1)
actionview (= 7.1.1)
activejob (= 7.1.1)
activesupport (= 7.1.1)
actionmailer (7.1.0)
actionpack (= 7.1.0)
actionview (= 7.1.0)
activejob (= 7.1.0)
activesupport (= 7.1.0)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
actionpack (7.1.1)
actionview (= 7.1.1)
activesupport (= 7.1.1)
actionpack (7.1.0)
actionview (= 7.1.0)
activesupport (= 7.1.0)
nokogiri (>= 1.8.5)
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.1)
actionpack (= 7.1.1)
activerecord (= 7.1.1)
activestorage (= 7.1.1)
activesupport (= 7.1.1)
actiontext (7.1.0)
actionpack (= 7.1.0)
activerecord (= 7.1.0)
activestorage (= 7.1.0)
activesupport (= 7.1.0)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.1)
activesupport (= 7.1.1)
actionview (7.1.0)
activesupport (= 7.1.0)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
Expand All @@ -59,22 +59,22 @@ GEM
activemodel (>= 5.2.0)
activestorage (>= 5.2.0)
activesupport (>= 5.2.0)
activejob (7.1.1)
activesupport (= 7.1.1)
activejob (7.1.0)
activesupport (= 7.1.0)
globalid (>= 0.3.6)
activemodel (7.1.1)
activesupport (= 7.1.1)
activerecord (7.1.1)
activemodel (= 7.1.1)
activesupport (= 7.1.1)
activemodel (7.1.0)
activesupport (= 7.1.0)
activerecord (7.1.0)
activemodel (= 7.1.0)
activesupport (= 7.1.0)
timeout (>= 0.4.0)
activestorage (7.1.1)
actionpack (= 7.1.1)
activejob (= 7.1.1)
activerecord (= 7.1.1)
activesupport (= 7.1.1)
activestorage (7.1.0)
actionpack (= 7.1.0)
activejob (= 7.1.0)
activerecord (= 7.1.0)
activesupport (= 7.1.0)
marcel (~> 1.0)
activesupport (7.1.1)
activesupport (7.1.0)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
Expand Down Expand Up @@ -155,7 +155,7 @@ GEM
dotenv-rails (2.8.1)
dotenv (= 2.8.1)
railties (>= 3.2)
drb (2.2.0)
drb (2.1.1)
ruby2_keywords
erubi (1.12.0)
factory_bot (6.4.1)
Expand Down Expand Up @@ -245,7 +245,7 @@ GEM
activesupport (>= 4)
railties (>= 4)
request_store (~> 1.0)
loofah (2.22.0)
loofah (2.21.4)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
Expand All @@ -258,11 +258,11 @@ GEM
memoist (0.16.2)
mini_magick (4.12.0)
mini_mime (1.1.5)
mini_portile2 (2.8.5)
mini_portile2 (2.8.4)
minitest (5.20.0)
msgpack (1.6.0)
multi_json (1.15.0)
mutex_m (0.2.0)
mutex_m (0.1.2)
net-imap (0.4.1)
date
net-protocol
Expand All @@ -273,10 +273,10 @@ GEM
net-smtp (0.4.0)
net-protocol
nio4r (2.5.9)
nokogiri (1.15.5)
nokogiri (1.15.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.15.5-x86_64-linux)
nokogiri (1.15.4-x86_64-linux)
racc (~> 1.4)
omniauth (2.1.1)
hashie (>= 3.4.6)
Expand Down Expand Up @@ -308,12 +308,10 @@ GEM
ast (~> 2.4.1)
racc
pg (1.4.5)
psych (5.1.1.1)
stringio
public_suffix (5.0.3)
puma (5.6.7)
nio4r (~> 2.0)
racc (1.7.3)
racc (1.7.1)
rack (2.2.8)
rack-oauth2 (2.2.0)
activesupport
Expand All @@ -331,30 +329,30 @@ GEM
rackup (1.0.0)
rack (< 3)
webrick
rails (7.1.1)
actioncable (= 7.1.1)
actionmailbox (= 7.1.1)
actionmailer (= 7.1.1)
actionpack (= 7.1.1)
actiontext (= 7.1.1)
actionview (= 7.1.1)
activejob (= 7.1.1)
activemodel (= 7.1.1)
activerecord (= 7.1.1)
activestorage (= 7.1.1)
activesupport (= 7.1.1)
rails (7.1.0)
actioncable (= 7.1.0)
actionmailbox (= 7.1.0)
actionmailer (= 7.1.0)
actionpack (= 7.1.0)
actiontext (= 7.1.0)
actionview (= 7.1.0)
activejob (= 7.1.0)
activemodel (= 7.1.0)
activerecord (= 7.1.0)
activestorage (= 7.1.0)
activesupport (= 7.1.0)
bundler (>= 1.15.0)
railties (= 7.1.1)
railties (= 7.1.0)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.1.1)
actionpack (= 7.1.1)
activesupport (= 7.1.1)
railties (7.1.0)
actionpack (= 7.1.0)
activesupport (= 7.1.0)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
Expand All @@ -366,7 +364,7 @@ GEM
psych (>= 4.0.0)
redis (4.8.0)
regexp_parser (2.8.1)
reline (0.4.0)
reline (0.3.2)
io-console (~> 0.5)
remote_syslog_logger (1.0.4)
syslog_protocol
Expand Down Expand Up @@ -441,7 +439,6 @@ GEM
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
stringio (3.0.9)
swd (2.0.2)
activesupport (>= 3)
attr_required (>= 0.0.5)
Expand Down Expand Up @@ -495,7 +492,7 @@ PLATFORMS

DEPENDENCIES
active_model_serializers (>= 0.10.14)
active_storage_validations (>= 1.1.0)
active_storage_validations (>= 1.0.4)
aws-sdk-s3
bcrypt (~> 3.1.7)
bigbluebutton-api-ruby (= 1.9.1)
Expand Down Expand Up @@ -524,7 +521,7 @@ DEPENDENCIES
pagy (~> 6.0, >= 6.0.0)
pg
puma (~> 5.6)
rails (~> 7.1.1)
rails (~> 7.1.0)
redis (~> 4.0)
remote_syslog_logger
rspec-rails (>= 6.0.4)
Expand Down
1 change: 0 additions & 1 deletion app/assets/locales/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@
"click_to_upload": "Κάντε κλικ για μεταφόρτωση ",
"drag_and_drop": "ή σύρετε και αποθέστε το αρχείο",
"upload_description": "Μεταφόρτωση εγγράφου ή αρχείου PDF (έως {{size}}). Ανάλογα με το μέγεθος του αρχείου, απαιτείται χρόνος για τη μεταφόρτωση πριν τη χρήση του",
"delete_presentation": "Διαγραφή παρουσίασης",
"are_you_sure_delete_presentation": "Θέλετε σίγουρα να διαγράψετε αυτή την παρουσίαση;"
},
"shared_access": {
Expand Down
7 changes: 1 addition & 6 deletions app/assets/locales/gl.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
"account_info": "Información da conta",
"delete_account": "Eliminar a conta",
"change_password": "Cambiar o contrasinal",
"set_password": "Defina o seu novo contrasinal",
"reset_password": "Restabelecer o contrasinal",
"update_account_info": "Actualizar a información da conta",
"current_password": "Contrasinal actual",
Expand Down Expand Up @@ -130,7 +129,6 @@
"click_to_upload": "Prema para enviar",
"drag_and_drop": " ou arrastre e solte",
"upload_description": "Envíe calquera documento de oficina ou ficheiro PDF (non maior que {{size}}). Dependendo do tamaño do ficheiro, pode requirir un tempo adicional para envialo antes de poder utilizalo",
"delete_presentation": "Eliminar presentación",
"are_you_sure_delete_presentation": "Confirma que quere eliminar esta presentación?"
},
"shared_access": {
Expand Down Expand Up @@ -167,7 +165,6 @@
"recording": {
"recording": "Gravación",
"recordings": "Gravacións",
"processing": "Procesando as gravacións…",
"name": "Nome",
"length": "Duración",
"users": "Usuarios",
Expand Down Expand Up @@ -350,8 +347,7 @@
"manage_site_settings": "Permitir que os usuarios con este rol xestionen os axustes do sitio",
"manage_roles": "Permitir que os usuarios con este rol editen outros roles",
"shared_list": "Incluir os usuarios con este rol no menú despregábel para compartir salas",
"room_limit": "Límite de salas",
"email_on_signup": "Recibir un correo-e cando se rexistre un novo usuario"
"room_limit": "Límite de salas"
}
}
},
Expand All @@ -362,7 +358,6 @@
"user_updated": "O usuario foi actualizado.",
"user_deleted": "O usuario foi eliminado.",
"avatar_updated": "O avatar foi actualizado.",
"password_changed": "O seu contrasinal foi actualizado correctamente. Acceda de novo.",
"password_updated": "O contrasinal foi actualizado.",
"account_activated": "A súa conta foi activada.",
"activation_email_sent": "Enviouse un correo que contén as instrucións para activar a súa conta.",
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/v1/verify_account_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def activate
def find_user_and_authorize
return render_error status: :bad_request unless params[:user]

@user = User.find_by id: params[:user][:id], provider: current_provider
@user = User.find_by id: params[:user][:id]
render_data status: :ok unless @user && !@user.verified?
end
end
Expand Down
5 changes: 0 additions & 5 deletions app/controllers/concerns/authorizable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ def ensure_authenticated
render_error status: :unauthorized unless current_user
end

# Ensures that the user is NOT logged in
def ensure_unauthenticated
render_error status: :unauthorized if current_user
end

# PermissionsChecker service will return a true or false depending on whether the current_user's role has the provided permission_name
def ensure_authorized(permission_names, user_id: nil, friendly_id: nil, record_id: nil)
render_error status: :forbidden unless PermissionsChecker.new(
Expand Down
1 change: 1 addition & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module ApplicationHelper
def branding_image
asset_path = SettingGetter.new(setting_name: 'BrandingImage', provider: current_provider).call
asset_url(asset_path)
#"https://jobs.secunet.com/templates/secunet/images/secunet_logo.png"
end

def page_title
Expand Down
4 changes: 3 additions & 1 deletion app/javascript/components/rooms/room/forms/ShareRoomForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export default function ShareRoomForm({ room }) {
const currentUser = useAuth();

function roomJoinUrl() {
return `${window.location}/${room.friendly_id}/join`;
if (room.friendly_id !== undefined)
return `${window.location}/${room.friendly_id}/join`;
return `${window.location}/join`;
}

function copyInvite() {
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/components/rooms/room/join/JoinCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default function JoinCard() {
}

roomStatusAPI.mutate(data);
const interval = setInterval(() => roomStatusAPI.mutate(data), 30000);
const interval = setInterval(() => roomStatusAPI.mutate(data), 5000);
setJoinInterval(interval);
};
const reset = () => { setHasStarted(false); };// Reset pipeline;
Expand Down
7 changes: 2 additions & 5 deletions app/javascript/routes/AuthenticatedOnly.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import useDeleteSession from '../hooks/mutations/sessions/useDeleteSession';
export default function AuthenticatedOnly() {
const { t } = useTranslation();
const currentUser = useAuth();
const location = useLocation();
const roomsMatch = useMatch('/rooms/:friendlyId');
const superAdminMatch = useMatch('/admin/*');
const deleteSession = useDeleteSession({ showToast: false });
Expand All @@ -43,11 +44,7 @@ export default function AuthenticatedOnly() {

// Custom logic to redirect from Rooms page to join page if the user isn't signed in
if (!currentUser.signed_in && roomsMatch) {
return <Navigate to={`${roomsMatch.pathnameBase}/join`} />;
}

if (currentUser.signed_in && currentUser.isSuperAdmin && !superAdminMatch) {
return <Navigate to="/admin/users" />;
return <Navigate to={`${location.pathname}/join`} />;
}

if (currentUser.signed_in && currentUser.isSuperAdmin && !superAdminMatch) {
Expand Down
Loading

0 comments on commit 8b3bdd5

Please sign in to comment.