* Refactors _banish.html.erb by removing duplicate code
* Refactors _banish.html.erb to account for new and old users
* Moves conditional into Admin::UsersController#set_user_to_be_banished
* Reverts last commit, as it didnt work as expected
* Fixes last commit, which reverted to the incorrect code
* Pulls banishable user into instance var and fixes button txt
* Removes admin_member_view feature flags and refactors conditionals
* Removes unused admin/users/_email_tools partial and user_email_tools_spec
* Actually remove the admin/user_email_tools_spec this time
* Removes the edit route from admin.rb users
* Adds a DUS (and spec) to disable and remove admin_member_view flag
* Fixes admin/users_spec.rb failures by updating spec with Member Detail changes
* Fixes spec failures within admin_bans_or_warns_user_spec.rb
* Refactors Admin::UsersController#credit_params due to failing specs
* Removes last traces of edit_admin_user_path and fixes buttons, specs, etc.
* WIP: Adds tabs to the Admin Member Detail View
* WIP: Adds tabs in the least elegant way to Admin Member Detail View
* WIP: Comments out unused code
* WIP: Initial code set up for tabs
* feat: add a tab param to the route
* feat: set the current tab and direct to the overview tab in all other cases
* chore: remove all other unused code
* Renames @tab to @current_tab and MemberDetails to UserDetails
* Removes unused route and reverts renaming of params
* Removes unused route from admin.rb
* Adds an E2E test that tests tabbing through Admin Member Detail tabs
* Updates navigateTabs E2E and _tabs.html.erb per feedback
* Updates tnavigateTabs.spec.js
* Updates navigateTabs.spec.js per Suzannes suggestion :)
* Removes useless comment from Admin::UsersController
Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
* feat: remove the default email and cobine the periodic digest and the contact email under the Email section
* refactor: rename the email_link to contact link and use the contact_email as a default and fallback to the ForemInstance.email
* chore: alignment
* feat: use the contact_email helper
* feat: move the contact_email to the ForemInstance model
* feat: use ForemInstance.contact_email instead of the application helper method
* removed the application Helper
* feat: set the dafault on the contact_email
* fix: cypress tests
* Update app/lib/constants/settings/general.rb
Co-authored-by: Michael Kohl <me@citizen428.net>
Co-authored-by: Michael Kohl <me@citizen428.net>
* Removes code behind new_admin_members feature flag
* Removes components/admin/users/tools/* and the tools components
* Removes unused /admin/users/tools/* controllers, comments, and routes
* Removes New Member View-related E2E and RSpec specs
* Remove admin_users_tools.rb frin spec/support/shared_examples/
* Removes remaining component-related specs
* Removes the view_component gem and test helper
* Resolve merge conflicts in Admin::UsersController
* Removes the view_component gem, as it is no longer used
* Removes view_component from Gemfile.lock
* init
* .
* partials
* few extras
* revert indicators in favor of separate PR
* stuff
* .
* stuff
* whoops
* .
* .
* .
* .
* opacity
* partial
* cosmetics
* move actions to a partial
* whoopsy
* Added an @admin alias for the frontend and removed the @admin-controllers alias.
* Added modal support for admin user actions.
* Added modal support for more parts of the user admin.
* pills
* pills
* pills
* Added optional chaining for when the overview panel isn't loaded.
* styling updates
* fix
* modals
* pass size
* tags
* .
* balance modal
* comment
* fixes
* Improved modal trigger implementation.
* Removed default value for dataset.
* Moved prevent default to after modal trigger check so forms still submit.
* Update app/views/admin/users/widgets/_credits.html.erb
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
* Update app/views/admin/users/reports/_index.html.erb
* Apply suggestions from code review
* Apply suggestions from code review
* Update app/views/admin/users/actions/_export.html.erb
* Update app/views/admin/users/widgets/_tag_moderation.html.erb
* Update app/views/admin/users/actions/_merge.html.erb
* Removed <AdminUserActionsModal /> component as it wasn't necessary.
* Fixed duplicate ID errors detected by Axe.
* Redirects to the Show page rather than the Edit page
* Adjusts quotations within _social_accounts.html.erb
* Ensures that Learn More links open in new tab
* updates with latests and greatest
* .
* fixes
* wip. Fixed some issues in the credits form.
* Changed Subtract to Remove for credits dropdown.
* Cleaned up the edits form.
* Wraps functionality in feature flag and calls #set_user_details
* Wraps /admin/users/show.html.erb in feature flag
* wip: Got credit params form working.
* empty select
* responsiveness
* empty commiit
* Updates redirects in spec and controller to show rather than edit
* Updates tag moderation copy in Admin Member Detail View
* Now the note is saved when changing credits.
* Fixed label for attributes as it was affecting writing tests and a11y.
* Removes unused index.js component
* Refactored credit params.
* chore: move method under private and update comment
* verified email responsiveness
* better opacity variables
* better org logo
* indicators
* refactor the credits method
Co-authored-by: Nick Taylor <nick@dev.to>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
Co-authored-by: Nick Taylor <nick@forem.com>
Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
* Change display from "created by user" to "reacted to user"
The reaction user_id is the creator (who reacted) and not the
target (reacting to what). On the user edit page, show reactions to
the user, rather than reaction from the user.
* Constants for controller allowed params
* Apply suggestions from code review
Co-authored-by: Michael Kohl <me@citizen428.net>
Co-authored-by: Michael Kohl <me@citizen428.net>
* Test with Grid layout
* Use Flexbox
* Replace with utility classes
* Wire up Tools -> Emails
* Stash: will rebase with a better commit message
* Fix transition between Email and Tools component
* Refactor Verify Email Ownership button a bit
* Use respond_to for verify_email_ownership
* Wrap the Preact Snackbar controller in Stimulus and use it from users/tools/email_controller
* Add HTML5 validation to EmailComponent
* Validation and cleanup
* Add Email history list and fix styling
* Additional styling cleanups
* Add error handling
* Close panel after email operations
* Actually use <local-time> GitHub time element correctly
* Add specs for Tools component and controller
* Email to Emails
* Add tests for Admin::Users::Tools::EmailsComponent
* Fix bug with ToolsComponent instantiation in ToolsController
* Add notes to show page
* Add ToolsComponent css
* Use Rails UJS instead of manual Stimulus to connect remote helpers
* Make Notes section come alive by adding its code
* Make Credits section come alive by adding its code
* Go back to vertical flex
* Finalize small restructuring of credits code
* Simplify ToolsComponent instantiation
* Add basic Add user to org functionality
* Make update user permissions form work
* Make remove user from org work
* Use generic Stimulus AjaxController to cleanup code
* Use Stimulus AjaxController for NotesComponent
* Use Stimulus AjaxController for CreditsComponent
* Use Stimulus AjaxController for OrganizationsController
* Add Admin::Users::Tools::ReportsComponent
* Do not display snackbar message if there is no message
* Add Admin::Users::Tools::ReactionsComponent
* Fix EmailsComponent spec
* Add CreditsComponent tests
* Fix quotes
* Add OrganizationsComponent specs
* Add ReportsComponent spec
* Add ReactionsComponent spec
* Fix rubocop violation
* Fix ToolsComponent specs
* Remove unused variable
* More tests
* Use keyword argument for ToolsComponent
* Fill in Tools requests specs
* Use Rspec shared_examples for ToolsController and EmailsController
* Add tests for Admin::Users::Tools::CreditsController
* Add tests for Admin::Users::Tools::NotesController
* Add tests for Admin::Users::Tools::OrganizationsController
* Add tests for Admin::Users::Tools::ReactionsController and ReportsController
* Fix bugs and add tests to Admin::OrganizationMembershipsController
* Add comments to deprecated sections of the UsersController
* Fix bugs and add tests to Admin::UsersController #send_email and #verify_email_ownership
* Add User model tests
* Feature flag fixes
* Add Cypress Tools - Emails tests
* Add Cypress Tools - Notes tests
* Add Cypress Tools - Credits tests
* Add Cypress Tools - Organizations tests
* Add Cypress Tools - Reports and Reactions tests
* Mark the replace target as a polite region
* Update view_component gem
* Tiny fixes
* Fix spec
* Wrap component rendering in render_component
* Move user.related_negative_reactions to a Reaction scope
* Move user.reports to a FeedbackMessage scope
* Move user.last_verification_date as EmailAuthorization class method
* Revert encapsulation to private
* Fix boxes backlinks names
* Add keyboard focus styling to boxes
* Remove duplicate styling
* Remove duplicated header element
* Improve heading hiearchy
* Fix <legend> and labels
* Backlink should be Tools not Users
* Announce section change to screen reader and fix focus
* Fix specs
* Add focus style for backlinks
* Enable email sending in e2e mode
* Use Settings instead of env variable
* Replaced granular emails with the default one
* Set reply to header in emails
* Extract shared_examples from NotifyMailer
* Removed unused code
* Replaced SiteConfig with Settings::General
* Fixes related to replacing SiteConfig with Settings
* Removed duplicate line from specs
* Rename SiteConfig
* More renaming
* Update spec
* Update mandatory settings mapping
* More renaming
* e2e test fixes
* You have a rename, and you have a rename
* Spec fix
* More changes
* Temporarily disable specs
* After-merge update
* Undo rename for migration
* undo rename of DUS
* Fix DUS
* Fix merge problem
* Remove redundant DUS
* Fix specs
* Remove unused code
* Change wrong class name
* More cleanup
* Re-add missing values to constant
* Fix constant
* Fix spec
* Remove obsolete fields
* Add accidentally removed field
* Update spec
* Move methods from Settings::General to ForemInstance
* Remove unneeded model
* Change mentions of 'site config'
* fix: remove hardcoded paths
* fix: use path helpers
* swap href for link_to
* feat: use path helpers
* feat: use a data path to send through the path that we will be calling
* feat: pass route through to js
* dus index path
* chore: change to use path_helpers
* feat: update DUS controller
* chore: oops remove these paths
* Remove pro role on user, expose pro dashboard to all users as analytics
* Remove pro from Elasticsearch mappings
* Update user role docs to use :trusted over :pro
* Remove pro from Role model spec
* Remove more references to pro, as noted by @rhymes
* WIP: Adds a Users::RemoveRole service to encapsulate Admin::UsersController#destroy
* Adds #role_display_name helper to application_helper.rb for extensibility
* Adjusts Member is Suspended banner to Member is Banned for consistency
* WIP: Extract Admin::UsersController#destroy into remove_role.rb service
* Cleans up Admin::UsersController#destroy and remove_role.rb service
- Removes unneccessary code from Admin::UsersController#destroy
- Replaces args with keyword args in Admin::UsersController#destroy
- Replaces args with keyword args in remove_role.rb service
- Refactors code to be more extensible and cleaner overall
* Adds a remove_role_spec.rb to test Users::RemoveRole service
* Fix typo in Admin::UsersController#destroy
* Refactors role_display_name helper method and reverts change to banner
* Use #role_display_name in _current_roles.html.erb
* Refactors conditional, names, and adjusts spec to account for refactors
* Raises StandardError if there is an issue with role removal
* Add the ability to remove a role from a non-super_admin in Admin::UsersController
- Adds a #destroy action to the Admin::UsersController
- Adds a destroy route for the action
* Add a removal button to non-super_admin roles on admin user pages
- Pulls Current Roles out of _activity and into own partial
- Adds a _current_roles partial to /admin/users/show
- Adds REMOVE buttons to non-super_admin roles
- Conditionally renders REMOVE buttons for certain roles only
* Add tests around the removal of roles to users_manage_spec
* Adjust formatting of link_to in _current_roles.html.erb
* Use :aggregate_failures in role-related tests in users_manage_spec.rb
* Refactors Admin::UsersController#destroy and role params
* Update admin/users_spec.rb to take into account _current_roles partial
* Replace REMOVE text with X on role removal buttons
* Add additional elsif to handle single_resource_admin removal
- Adds resource_type params to Admin::UsersController
- Adds elsif to handle removal of single_resource_admin roles
- Adds resource_type to the removal button in _current_roles
- Adds a spec around removing single_resource_admin roles
* Add .constantize to resource_type in Admin::UsersController
* Move .constantize to resource_type arg rather than params in #destroy
* Use .safe_constantize rather than .constantize for params[:resource_type]
* Remove .safe_constantize from params and onto inline var instead
* Add nil check to removal of :single_resource_admin role in #destroy
* Update users_manage_spec.rb to remove proper role in test
* Add resource_name to current user and super admin _current_roles list
* Add additional test around removing :single_resource_admin role
* Remove GitHub repositories when user deletes their own GitHub identity
* Remove GitHub repos also from the admin remove identity
* Add a notice in Settings/Extension
* Add data update script to cleanup orphan GitHub repos
* Display gdpr delete requests for deleted users in admin
* Added a test for destroy a gdpr request
* Reorganized gdpr requests menu
* Update schema version
* Added a link to the flash notice after user delete by admin
* Fix namespace for tests
* Aligh schema.rb with master
* Added a missing newline
* Removed unused partial
* Fix typo
Co-authored-by: Michael Kohl <me@citizen428.net>
* Replaced string with symbols for AR
Co-authored-by: Michael Kohl <me@citizen428.net>
* Added an AuditLog record on gdpr delete confirmation
* Make email and user_id required in Users::GdprDeleteRequest
* Checked out package.json from master
* Fix Gdpr => GDPR
* Added missing space
* Remove unneeded freeze
Co-authored-by: Michael Kohl <me@citizen428.net>
* Update data exporter to handle admin send
* Match button with everything else
* Use proper redirect path
* Stub SiteConfig definition instead of setting it
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
* Removed if statement by accident oops
* Remove non-functional boolean param and pass email directly
* Use refinement to conv to boolean instead of JSON.parse
* Rename to StringToBoolean
* Use 'using' in proper scope (not in method)
* Rename to_bool to to_boolean
* Refactor if statement, thanks rhymes!
* Fix small bugs in tests
* Remove tracking for export_email b/c no @user
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
* Adds Recent Reations back to the Admin Users page...UGH rebasing :(
- Render negative_reactions partial in admin/edit.html.erb
- Add #set_related_reactions back to Admin::UsersController
- Refacotors JS to target #reports-row in _reports.html.erb
* Alphabetizes reports and reactions partials in edit.html.erb
* Adds tests around Recent Reports and Recent Reactions sections to users_spec.rb
* Refactoring user_controller separating some classes to service
* Replace service Credit::Manager and improve yours specs
* improve method with memoize
* Adds _reports partial and renders _reports.html.erb in /admin/users/edit.html.erb
* Adds a Recent Reports sections and a toggle function to /admin/users/_reports
* WIP: display feedback_messages in _reports.html.erb
* Adds #set_feedback_messages to Admin::Users::Controller and adjusts _reports.html.erb
* Adjusts #set_feedback_messages to look for message ids and adds to _reports.html.erb data
* Remove accidental dead code from Admin::Users::Controller
* Adjusts the else statement wording to be more fun
* Adjusts style of recent reports to mirror style of recent reactions
* Implement Admin UI changes to Recent Reports section of admin/users/:id/edit
* Adds a link to the admin_feedback_messages_path for each report in _reports.html.erb
* Adjusts the path used when a report is clicked on in _reports.html.erb
* Adds #user_types check to feedback_message.rb to determine Affected, Offender, or Reporter in _reports
* Capitalizes Admin on Admin Profile button for better consistency
* Adds reactions and reports partials and adjusts filenames of _notes, _activity, and _credits
* Removes code related to reports to separate this PR and the reports PR
* Adds ability to toggle Recent Reactions and adds #get_related_reactions to controller
- Adds a #get_related_reactions method to the Admin::Users::Controller
- Moves the rendering of the reactions partial below the notes partial in edit
- Styles Recent Reactions in a list format with the ability to toggle
* Modifies #set_related_reactions name, query, and limit and the _reactions view with it
- Adjust #get_related_reactions to read #set_related_reactions
- Sort reactions by descending created_at
- Add a limit of 15 to reactions displayed for any given user
- Add .empty? in place of .nil? to _reactions.html.erb reaction check
* Adjusts the format of how Recent Reactions are displayed and adds Reaction category
* Adds a check for category: vomit in #set_related_reactions
* Renames partial, adds User reactions to #set_related_reactions, and adjusts partial styling
* Rewords message displayed when no negative reactions exist to make it fun
* Adds additional styling changes to recent reactions
* First draft - all the big changes
* Changing some more references to 'internal'
* Relocate internal request tests to admin
* Relocate internal system tests to admin
* Fix trailing space
* Test fix
* Move queries from internal to admin
* Docs updates
* Rename internal stimuls controllers to admin (plus docs)
* Rename admin layout
* Fix routing after rebase
* Fixes for latest added admin interfaces
* Serviceworker ignore paths
* Set github and twitter usernames to nil if they are blank
* Verify github and twitter username in the Admin::UsersController (just in case)
* Add unique indexs on users twitter_username and github_username
* Validate for trailing slash instead of strict validation
* Remove unused sign_in_count field
* Add profile URLs to edit view
* Add profile URLs to admin controller params
* Add profile URLs to edit view
* Clean up index and search views for user
* Move around user fields to make more sense
* Display more informative label
* Remove name_of_user field in favor of new display label
* Fix typo
* Remove duplication for website, employer, and Mastodon URLs
* Add score to comment params
* Remove unused name_of_user field views
* Fix typo for medium url
* Fix weird breakpoint top-nav issue
* Fix error handling when submitting blank note
* Change status closed to invalid
* Add ability to sort between status
* WIP
* Add working views for new report page
* Add mailer WIP
* Add MVP of new reports system
* Move collapse to the right & add show page link
* Fix buttons for index page
* Change collapse to collapse/expand
* Remove email functionality from new report
* Update copy of report abuse responses
* WIP of showing emails in reports
* Fix notes for user_role_service.rb
* Remove unused scripts from internal.html.erb
* Update tests for reports dashboard
* Add missing migration file
* Add finishing touches to reports dashboard
* Remove deprecated methods
* Update view with better timestamps
* Update and write new tests
* Add .codeclimate.yml
* Remove commented out editor thing
* Undo commented out code for recaptcha method
* Undo comment out code for development
* Use new comment path instead of old comment path
* Fix edge case for tag admin update
* Change single quotes to double quotes
* Add MVP of tag edit page
* Update rubocop version
* Use actual hex colors since vars broke
* Add enabling tag moderators via admin panel
* Remove unused boolean and variables
* Add a description for scholars
* Remove unintended method
* Update auth to work correctly
* Update boolean properly