Skip to content
Snippets Groups Projects
Unverified Commit 455a4f82 authored by Hadi Cheaito's avatar Hadi Cheaito Committed by GitHub
Browse files

Todo labelling + todo fixes (#4535)

* Todo labelling + todo fixes

* put proper openId config
parent 957a13f6
Branches
Tags
No related merge requests found
Showing
with 21 additions and 21 deletions
......@@ -23,7 +23,7 @@ module Api
# DELETE /api/v1/recordings/:id.json
# Deletes a recording in both BigBlueButton and Greenlight
def destroy
# TODO: - Need to change this to work preferably with after_destroy in recordings model
# TODO: Hadi - Need to change this to work preferably with after_destroy in recordings model
BigBlueButtonApi.new.delete_recordings(record_ids: params[:id])
Recording.destroy_by(record_id: params[:id])
......
......@@ -35,7 +35,7 @@ module Api
return render_error status: :bad_request if new_password.blank?
# Invalidating token and changing the password.
# TODO: optimise this.
# TODO: Amir - optimise this.
return render_error status: :internal_server_error unless @user.invalidate_reset_token
@user.update! password: new_password
......
......@@ -57,7 +57,7 @@ module Api
value == 'false' ? '' : generate_code
end
# TODO: Check if we could extract all GL3 codes generation into a service.
# TODO: Amir - Check if we could extract all GL3 codes generation into a service.
def generate_code
SecureRandom.alphanumeric(6).downcase
end
......
......@@ -31,7 +31,7 @@ module Api
user = User.verify_activation_token(token)
return render_error status: :forbidden unless user
# TODO: optimise this.
# TODO: Amir - optimise this.
return render_error status: :internal_server_error unless user.invalidate_activation_token
user.verify!
......
......@@ -15,7 +15,6 @@ module Authorizable
# 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)
# TODO: - should this return a status: :not_found instead of :unauthorized if the user doesn't have the permission AND the param doesn't exists?
return render_error status: :forbidden unless PermissionsChecker.new(
current_user:,
permission_names:,
......
......@@ -17,7 +17,6 @@ export default function RolePermissionRow({
type="checkbox"
defaultChecked={defaultValue}
onClick={(event) => {
// TODO: Currently using roleId and name, review this
updateAPI.mutate({ role_id: roleId, name: permissionName, value: event.target.checked });
}}
/>
......
......@@ -16,7 +16,7 @@ import UpdateRecordingForm from './forms/UpdateRecordingForm';
import DeleteRecordingForm from './forms/DeleteRecordingForm';
import Modal from '../shared_components/modals/Modal';
// TODO: Refactor this.
// TODO: Amir - Refactor this.
export default function RecordingRow({
recording, visibilityMutation: useVisibilityAPI, updateMutation: useUpdateAPI, deleteMutation: useDeleteAPI,
}) {
......@@ -41,7 +41,7 @@ export default function RecordingRow({
</div>
<Stack>
<strong>
{/* TODO: add an x button or something to the edit name form */}
{/* TODO: Samuel - add an x button or something to the edit name form */}
<UpdateRecordingForm
mutation={useUpdateAPI}
recordId={recording.record_id}
......
......@@ -16,7 +16,6 @@ export default function Rooms() {
<Tab className="background-whitesmoke" eventKey="rooms" title={t('room.rooms')}>
<RoomsList />
</Tab>
{/* TODO: May need to change this to it's own component depending on how RecordingsTable will work */}
<Tab className="background-whitesmoke" eventKey="recordings" title={<RecordingsCountTab count={recordingsCount} />}>
<Recordings />
</Tab>
......
......@@ -88,7 +88,7 @@ export default function RoomJoin() {
if (hasStarted) {
toast.success(t('toast.success.room.meeting_started'));
console.info(`Attempting to join the room(friendly_id): ${friendlyId} meeting in 7s.`);
setTimeout(methods.handleSubmit(handleJoin), 7000); // TODO: Improve this race condition handling by the backend.
setTimeout(methods.handleSubmit(handleJoin), 7000); // TODO: Amir - Improve this race condition handling by the backend.
reset();// Resetting the Join component.
}
}, [hasStarted]);
......
......@@ -13,7 +13,7 @@ export default function AccessCodeRow({
const handleGenerateCode = () => updateAPI.mutate({ settingName, settingValue: true });
const handleDeleteCode = () => updateAPI.mutate({ settingName, settingValue: false });
// TODO: Extract this into a shared helper function.
// TODO: Samuel - Extract this into a shared helper function.
const copyAccessCode = (copiedCode) => {
navigator.clipboard.writeText(copiedCode);
toast.success(t('room.settings.access_code_copied'));
......
......@@ -18,7 +18,7 @@ export default function RoomSettingsRow({
return null;
}
// TODO: Refactor this to use react-hook-form & react-bootstrap.
// TODO: Amir - Refactor this to use react-hook-form & react-bootstrap.
return (
<div className="room-settings-row text-muted py-2 d-flex">
<label className="form-check-label me-auto" htmlFor={settingName}>
......
......@@ -17,7 +17,7 @@ export default function FormCheckBox({
}
FormCheckBox.propTypes = {
// TODO: refactor propTypes to reduce duplication.
// TODO: Amir - refactor propTypes to reduce duplication.
field: PropTypes.shape(
{
label: PropTypes.string,
......
......@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import useSessions from '../../hooks/queries/users/useSessions';
import getLanguage from '../../helpers/Language';
// TODO: Refactor this to use QueryClient context and fetch sessions data from queryCache.
// TODO: Amir - Refactor this to use QueryClient context and fetch sessions data from queryCache.
const AuthContext = React.createContext();
......
......@@ -9,7 +9,7 @@ export default function useVerifyToken(token) {
() => axios.post('/reset_password/verify.json', { user: { token } }),
{
onError: () => {
navigate('/'); // TODO: Obsecure this as a 404 case.
navigate('/'); // TODO: Amir - Obsecure this as a 404 case.
},
},
);
......
# frozen_string_literal: true
class UserMailer < ApplicationMailer
# TODO: add i18n.
# TODO: Amir - add i18n.
# rubocop:disable Rails/I18nLocaleTexts
# Sends a test email
def test_email
......
......@@ -8,7 +8,6 @@ class BigBlueButtonApi
# Sets a BigBlueButtonApi object for interacting with the API.
def bbb_server
# TODO: Amir - Protect the BBB secret.
# TODO: Hadi - Add additional logic here...
@bbb_server ||= BigBlueButton::BigBlueButtonApi.new(Rails.configuration.bigbluebutton_endpoint, Rails.configuration.bigbluebutton_secret, '1.8')
end
......
<%# TODO: Revisit this (i18n, styling, template,, add in logo, ...). %>
<%# TODO: Amir - Revisit this (i18n, styling, template,, add in logo, ...). %>
<div style="text-align:center; font-family:'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif">
<div style="display:inline-block; background-color:#F5F7FB; border:1px solid #d3d3d3; padding: 25px 70px">
......
<%# TODO: Revisit this (i18n, styling, template,, add in logo, ...). %>
<%# TODO: Amir - Revisit this (i18n, styling, template,, add in logo, ...). %>
<div style="text-align:center; font-family:'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif">
<div style="display:inline-block; background-color:#F5F7FB; border:1px solid #d3d3d3; padding: 25px 70px">
......
......@@ -81,7 +81,6 @@ Rails.application.routes.draw do
resources :rooms_configurations, only: :update, param: :name
resources :roles
resources :invitations, only: %i[index create]
# TODO: Review update route
resources :role_permissions, only: [:index] do
collection do
post '/', to: 'role_permissions#update'
......
......@@ -30,7 +30,12 @@ SECRET_KEY_BASE=
RAILS_ENV=
RAILS_SERVE_STATIC_FILES=
#TODO: Add the OpenId ENVs.
# OpenId configuration:
#OPENID_CONNECT_CLIENT_ID=
#OPENID_CONNECT_CLIENT_SECRET=
#OPENID_CONNECT_ISSUER=
#OPENID_CONNECT_REDIRECT=
#OPENID_CONNECT_UID_FIELD=
# Define the default locale language code (i.e. 'en' for English) from the fallowing list:
# [en, ar, fr, es]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment