Commit graph

1156 commits

Author SHA1 Message Date
Suzanne Aitchison
a0a4b8a851
Member index (Phase 2) - Invitations actions (#17213)
* Add actions to invitations table

* table style tweaks

* add specs for cancel and resend actions

* rspec resend test
2022-04-14 08:26:36 +01:00
Mac Siri
441a76972b
Refactor: Move onboarding routes out of UsersController (#17189) 2022-04-13 14:20:16 -04:00
Jeremy Friesen
f1d6291d00
Adding Feed Configuration documentation (#17248)
* Adding Feed Configuration documentation

This documentation outlines the scope and intention of the Feed
Configuration, it's primary purpose is to:

- Reference the historical context
- Establish a draft glossary
- Introduce high-level constraints
- Serve as a document to help with the task break-down

Closes forem/forem#17244
Relates to forem/forem#17245
Informs forem/forem-internal-eng#435

As a note, I'm looking at this document almost through the lens of
[literate programming][1].  In writing the document, I learned about and
attempted to describe the shape of this internal facing project.

Consider for a moment that we are not adding a new user facing feature
to the Forem code base.  Instead we're scoping this project as helping
ease the experimentation process regarding the feed.

In other words the scope of this project is to help name and refine
different feed strategies to understand what each strategy means.

Eventually this could mean that creators and members can have a
future opportunity to select feed strategies that reflect the
aspirational community values of the feed (e.g. we want a feed that
favors comments, or neighborhoods, or the occassional serendipity).

[1]:https://en.wikipedia.org/wiki/Literate_programming

* Update config/feed/README.md

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update config/feed/README.md

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update config/feed/README.md

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update README.md

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-04-13 13:04:25 -04:00
Arit Amana
240893401d
Show a "Unable to login" message in browser when a user is unable to login. (#17261)
* implementation and modify spec

* oops! correct unwanted change

* nudge Travis

* nudge Travis
2022-04-13 09:00:56 -04:00
Julianna Tetreault
471472d0b0
Add Internationalization to Admin::UsersController Success Messages (#17252)
* Adds internationalization to Admin::UsersController success messages

* Adds a new line at the end of en.yml and fr.yml

* Removes perriod from update_success message
2022-04-12 09:00:55 -06:00
Ridhwana
aff29406ac
First version of exporting the Users to a CSV (#17217)
* feat: add the export route

* feat: base export csv

* refactor: move the svg into its own file

* feat: add the export partial

* feat: export teh correct fields etc. for the csv

* user status helper

* feat: ensure that we format the time

* feat: add a spec for the CSV

* remove space

* remove puts

* chore: remove blank space

* feat: update traits

* Update app/views/admin/users/export.csv.erb

Co-authored-by: Jamie Gaskins <jgaskins@hey.com>

* Update spec/requests/admin/users/users_export_spec.rb

Co-authored-by: Jamie Gaskins <jgaskins@hey.com>

* Update spec/requests/admin/users/users_export_spec.rb

Co-authored-by: Jamie Gaskins <jgaskins@hey.com>

* fix: export should not error for unregistered users

Co-authored-by: Jamie Gaskins <jgaskins@hey.com>
2022-04-12 15:24:32 +02:00
Daniel Uber
2ddefcbba5
Remove guard clauses and update expectations (#17138) 2022-04-08 15:20:19 -05:00
Arit Amana
e4446a778c
Revalidate embedded links that redirect (#17150)
* complete implementation and add specs

* delete irrelevant spec and comment

* refactor validate_link method to return passed-in url

* better naming

* handle NotAllowed status in link validation
2022-04-07 13:32:07 -04:00
Jeremy Friesen
07983e38be
Adjusting conditional create post rendering (#17132)
* Revert "conditionally render create post button for admins #16490 (#16606)"

This reverts commit 1cb45995cb.

* Adding conditional create post rendering

This pull request does two things:

- Reverts the forem/forem#16606
- Replaces the conditional rendering with the approach from forem/forem#17076

What to consider:

- How does this impact Cumulative Layout Shift (CLS).  Prior to this
  commit, we didn't "flicker" the "Create Post" button into view if the
  site didn't have the conditional.
- In reverting forem/forem#16606 we remove a dependency on Turbo.
- We reduce one network call, relying instead on the async_info to carry
  the visible/hidden logic.

If the "flicker" is a problem we could add a conditional in the page for
if the site has enabled that feature.  However, that's a place holder as
we're looking at possible other reasons for allowing/disabling the
create a post.

This is a non-blocking PR, as in we can merge or not merge this and
proceed with what we have.  Instead the main goal is to "unify" our approach.

* Update cypress/integration/seededFlows/policyFlows/limitPostCreationToAdmins.spec.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Leveraging change from forem/forem#17143

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-04-07 09:11:37 -04:00
Arit Amana
5cf2229b58
Better Error Msg when Listing URL embedded and Listings are disabled (#17116)
* complete implementations and specs

* remove unused error msgs

* add "listing" and "listings" as ReservedWords
2022-04-06 08:38:53 -04:00
Jeremy Friesen
d181041ae2
Removing uncalled method ✂✂✂ (#17110)
Introduced in forem/forem#3176, it appears that this method has been
along for the ride.

How did I find this?  I saw an exception and realized that we cast our
comment IDs from base-26 integer format to base-10.  I decided to look
through our code for `/\.to_\w\(26\)/` and stumbled upon the now removed
instance.

Quickly looking at the code, it appeared that this method was never
called.

So ✂✂✂
2022-04-04 16:05:53 -04:00
Dwight Scott
71294dca14
OpenGraph fallback for Embeds (merge-by-any-core) (#17001)
* WIP -- start of OpenGraph class that wraps MetaInspector gem

* use properties method instead of hash

* Update app/services/open_graph.rb

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update app/services/open_graph.rb

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update app/services/open_graph.rb

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update app/services/open_graph.rb

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update app/services/open_graph.rb

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update app/services/open_graph.rb

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* address PR feedback

* adding some specs

* gem vendor cache

* more specs

* lock metainspector gem to 5.11

* Update app/services/open_graph.rb

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* WIP -- start of incorporating the open graph into the view

* regex match anything

* Update app/liquid_tags/open_graph_tag.rb

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Refactors and Improvements

* build UI (some wonkiness; see loom)

* UI improvements

* add hyperlink to embed url

* display site_name conditionally

* Make PR review changes; implement A-tag fallback for OG

* Address PR review comments

* Fix failing spec

* deleted superfluous assignment; switched filename annotations off

* nudge Travis

* Address PR feedback

* attempting to apply custom styles

* update specs

* update specs

* add favicon if exists

* remove site-name method

* styling changes 

* nudge Travis

* PR review comments

* keep border around A-tag fallback

* use preferred description

* remove www prefix from url

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Arit Amana <msarit@gmail.com>
2022-04-04 15:31:38 -04:00
Jeremy Friesen
1b2aa68a4d
Ensuring confirmation and flash message for spaces (#17072)
* Ensuring confirmation and flash message for spaces

This change delivers an accessible form, and while it doesn't remove the
Save button nor produce a modal it does deliver the minimum viable
functionality.

In conversations with Suzanne, we spent an hour looking at how we might
make an accessible modal with the checkbox and state management
required as we as removing save buttons.

There are two paths:

1. Extend the current, yet deprecated, stimulus modal controller.
2. Extend the Preact modal work done for the Members Detail View.

We spent about 15 minutes pursuing the stimulus modal controller route,
and realized how much cruft it added to the system.  Not ideal and very
opaque in it's interaction.

The second one we talked about, but for our alloted time was inadequate
to begin further work.  To deliver on that generalized preact modal will
require at least an afternoon of work.

Closes forem/forem#17032

* Update config/locales/controllers/admin/fr.yml

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

* Update app/views/admin/spaces/index.html.erb

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2022-04-04 11:49:15 -04:00
Jeremy Friesen
2fda726409
Revert "Added a way to sort comments on an article (#16686)" (#17093)
This reverts commit 1345334b33.
2022-04-04 08:36:34 -04:00
Ben Halpern
9f44530491
Add "comments_sort" to safe params list (#17083) 2022-04-01 18:27:49 -04:00
Ben Halpern
050976af25
Add "period" to safe params list (#17079) 2022-04-01 14:18:07 -04:00
VISHAL DEEPAK
1345334b33
Added a way to sort comments on an article (#16686)
* Added a way to sort comments on an article

* Sorting of comments now uses crayons-dropwn. Some minor fixes as per comments on PR

* Add and fix test cases for sorting comments functionality

* Changes in code for sort comments.  Code  is more aligned with forem's conventions

* Added cyperss tests for sort comments on an article. Cleaned up code to better follow forem conventions

* Get fresh handle of triggerButton everytime clickOustideListener is clicked. Fix Cypress test cases to reflect the earlier.
2022-04-01 09:26:18 -05:00
Michael Kohl
33195929aa
Bump to Rails 7.0.2.2 MVP (#15908)
* Update gems

* Update more gems

* Update @rails/ujs package

* Explicitly add sprockets-rails

* Gemfile update

* Run bin/rails app:setup

* Update redis-actionpack

* Update stats initializer autoloading

* Update acts-as-taggable-on

* Disable signed: true option in session store

* Switch back to released version of redis-actionpack

* Update Gemfile.lock

* WIP

* Update Rails and gems

* Move hair_trigger back to released gem

* Add explicit requires to initializers

* Update Rails version

* Add more explicit require_relative calls

* Re-enable ForemStatsDriver

* Update schema

* Temp spec changes

* Bullet started raising errors?

* Fix broken spec

* Temporarily disable hair_trigger_spec

* Refactor

* Fix spec

* Enable use_rfc4122_namespaced_uuids

* Revert "Enable use_rfc4122_namespaced_uuids"

This reverts commit 5dac3722284bb08049586bfa943405f8a01289df.

* Temporarily deploy to canary

* Revert "Temporarily deploy to canary"

This reverts commit 04f8469501fab2a3177450baf051ff6259c41827.

* Update Containerfile

* Add comments to specs

Co-authored-by: Mac Siri <krairit.siri@gmail.com>
2022-03-30 15:00:33 -04:00
Dwight Scott
1cb45995cb
conditionally render create post button for admins #16490 (#16606)
* Trigger Build

* WIP - use turbo to render html for create post button

todos and discussion topics
[] add tests (probably gonna be a lot of cypress 😅😭)
[] nominclature & file structure for authorization controller/routes
[] is this "authorizations" namespace approach the best?
[] authorization strategy relies on current user and caching doesn't
like `current_user`

* Use URL helper and not change the policy just yet

* put the turbo frame behind a feature flag

* Trigger Build

* Use URL helper and not change the policy just yet

* :)

* Add some test coverage and use same feature flag for consistency

* rubocop

* more rubocop

* trigger build

* adding a small sleep to see if specs pass 😩

* remove sleep

* disable Turbo session drive

* WIP

* Revert "WIP"

This reverts commit ce838672069fd703122156a0d82e5e6ad5398e0a.

* Moving spec from dashboard to root

With forem/forem#16913 the underlying test broke because we were
redirecting on the dashboard.

Co-authored-by: Jeremy Friesen <jeremy.n.friesen@gmail.com>
2022-03-29 13:04:57 -04:00
MrFuku
847cd594ba
Add toggle button to 'New Forem Secret' form (#17016)
* Add toggle button to 'New Forem Secret' form

* Display messages using i18n

* Fix from snake case to kebab case

* Fix a bug when the specified class did not exist
2022-03-29 08:29:29 -06:00
Jamie Gaskins
5dc11719be
Instrument AS::Cache#fetch_multi in Honeycomb (#17023)
See:
- https://api.rubyonrails.org/classes/ActiveSupport/Cache/Store.html#method-i-fetch_multi
- https://guides.rubyonrails.org/v6.1.4.7/active_support_instrumentation.html#cache-fetch-hit-active-support
2022-03-28 13:37:26 -04:00
Suzanne Aitchison
c5ffa8be92
Admin member index: Update pagination layout & styles (#16995)
* pagination theme for new admin view

* align pagination widget correctly in desktop view

* remove bottom pagination

* re-add pagination to the bottom

* use block styling for the links
2022-03-25 07:50:50 +00:00
Jeremy Friesen
38ef49a2f2
Adjusting article copy to be more general (#16973)
* Adjusting article copy to be more general

Our language regarding articles needs minor revisions to speak a bit
more generally about content.  This follows on the features of
AuthN/AuthZ work to allow forem admins to configure their forems such
that a subset of their forem members may not have the ability to create
articles.

Closes forem/forem#16890
Closes forem/forem#16891

* Update app/views/users/_notifications.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-03-23 11:34:33 -04:00
Arit Amana
161e18e5df
Better error upon Tweet embed when Twitter keys missing (#16916)
* complete implementation; specs remain

* complete specs

* better implementation

* more appropriate error msg

* ALSO change error msg in spec
2022-03-21 16:21:37 -04:00
Jeremy Friesen
88f4daf952
Penciling in a Default Spaces section (#16897)
* Penciling in a Default Spaces section

This delivers two primary things:

1.  Extracting shared policy examples
2.  Providing a functioning skeleton for toggling on the
    "limit_post_creation_to_admins" feature.

Important is that once merged, it would be possible for this code to
"leak" out.  But how that leaks out is also how you can test that the
feature works.

First, to orient, there is a constraint for a new route.  That
constraint checks if the feature flag exists (e.g. has been explicitly
enabled or explicitly disabled).  In other words, at this point, you
can't accidentally enable the feature via the UI.  But once you have
enabled the feature, you can then toggle the feature on and off.

So, to test this in the browser:

1. Pull down this branch
2. Run `rails runner "FeatureFlag.disable(:limit_post_creation_to_admins)"`
3. Startup your the web server.
4. Login as an administrator
5. Goto /admin/content_manager/spaces
   a. Bask in the glory of a plain HTML form
6. With another browser, login as another non-admin user
7. Go to /settings/extensions, you should see a section Publishing from RSS.
8. Now with the admin's session, update the form to turn on
  "limit_post_creation_to_admins"
9. Back to the non-admin browser, refresh /settings/extensions, you
   should no longer see the section Publishing from RSS.

Note: I have not included an admin menu item as that is related to and
dependent on some refactors I'm working on (see forem/forem#16888 and
forem/forem#16847).  So a bit of "security through obsurity"

Note: In the future, once we resolve forem/forem#16490, we'll start
toggling the "Create a Post" button.

Note: I am not including Cypress tests nor request tests for this
feature because the implementation details related to the testing via
that approach are a little too volitale.

Related to forem/forem#16842

* Updating copy based on forem/forem#16893

* styles

* styles

* dark styles

Co-authored-by: Paweł Ludwiczak <ludwiczakpawel@gmail.com>
2022-03-21 09:56:12 -04:00
Ridhwana
74a16beacb
Introduce "extensions" (#16840)
* feat: add the feature flag route and controller

* feat: add a ff page

* feat: update to a post with a success banner

* feat: test the feature

* feat: update the styling

* feat: change feature flag to extension witha  few more improvements like adding a model not backed by a table

* feat: update the text

* refactor: if you enable a FF, it gets added under the hood as well

* feat: accessibility name for label

* use keyword args

* use locales

* Update app/views/admin/extensions/index.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/admin/extensions/index.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/admin/extensions/index.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update config/locales/controllers/admin/fr.yml

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/controllers/admin/extensions_controller.rb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* fix: rubucop

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-03-18 11:22:17 +02:00
Arit Amana
c06be3f447
Allow option for "no readme" with GitHub embeds (#16895)
* Implementation and specs

* update docs

* refactor

* remove unneeded commented code

* remove real auth string

* complete stubbing with vcr cassette

* clearer error messaging

* activate VCR conventional way

* added naming clarity

* more robust options checks

* update docs

* nudge Travis

* clearer docs

* fix failing specs

* fix boolean method

* damn code
2022-03-17 12:06:26 -04:00
Nick Taylor
1300f7960a
chore: Removed unused webpack configuration (#16887) 2022-03-15 21:09:34 -04:00
yheuhtozr
dc903f836c
add keys to fr (#16872) 2022-03-15 08:53:47 -06:00
Arit Amana
34bfc491b0
Check validity of embed URLs (#16704)
* start link validation check

* keep PRs small

* rearrange check flow

* need a change to switch accounts

* Rescue from SocketError to surface a better error message

* some updates

* handle 301s

* address Travis failures

* implement request stub

* add needed unified-embed tag spec

* add needed unified-embed tag spec

* nudge Travis

* Address PR review comments

* special-case displaying "base"

* undo change to errors.add

* nudge Travis

* more succinct code

Co-authored-by: aritmock <aritmock@example.com>
Co-authored-by: Dwight Scott <dwight@forem.com>
2022-03-10 13:18:59 -05:00
Julianna Tetreault
aa44786ebd
Remove admin_member_view Feature Flag-Related Conditionals (#16764)
* 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.
2022-03-10 08:29:05 -07:00
Mac Siri
dbe1fb6ff3
Remove Spring and spring-commands-rspec gem (#16848)
* Remove spring and spring-commands-rspec

* Remove all traces of Spring

* Temporarily remove warning gem

* Remove comment
2022-03-10 10:12:51 -05:00
Mac Siri
63b5c9102d
Remove ForemStatsDriver abstraction (#16835)
* Remove ForemStatsDriver abstraction

* Remove stats.rb
2022-03-09 14:18:29 -05:00
Jeremy Friesen
aa07a96587
Removing reference to Generate Personal blog (#16823)
As part of removing Stackbit integration, I previously missed removing
the translation key.  This removes an errant key.

This commit was driven by attempting to address the following feature
request:

> Conditional hide "Generate a personal blog from your DEV Community
> posts" in /settings/extensions

There is option for this behavior.

Closes #16819
Missed as part of #15701
2022-03-08 09:40:14 -05:00
Jeremy Friesen
76933284b7
Authorize Web Monetization If User Can Create Article (#16824)
* Authorize Web Monetization If User Can Create Article

There are three things I'm introducing in this PR:

1. Extracting a partial
2. Reworking the i18n keys
3. Adding a policy check regarding Web Monetization

In *extracting a partial*, I'm following the existing pattern where
other extensions have their own partial.

In *reworking the i18n keys*, I'm ensuring that the keys are part of the
same namespace.  This will make finding their usage easier.  Further, if
we decide to remove (or convert to a plugin) the web_monetization, then
we're just a bit closer to that possibility.

Last, and the reason for the work, is *Adding a policy check regarding
Web Monetization*.  This follows on the work in forem/forem#16790.

Closes forem/forem#16820
Related to forem/forem#15098

There are two things to test:

1. Does the feature flag work or not.
2. Are the i18n keys properly applied.

For the feature flag:

- checkout this branch
- in rails console `FeatureFlag.enable(:limit_post_creation_to_admins)`
- start the rails server
- login as a non-admin user
- go to /settings/extensions and scroll to the bottom, you **shouldn't** see
  the partial
- login as an admin user
- go to /settings/extensions and scroll to the bottom, you **should** see
  the partial

Or visually verify the relatively simple change (and accept that it
conforms to #16790's existing pattern).

For the i18n keys, I have a before screenshot (from DEV.to) and the
after (from the changes on this branch).

* Adjustments based on contributor feedback
2022-03-08 09:39:34 -05:00
Andy Zhao
841491c6ee
Redirect appended /moderate and /admin to the same page (admin member view) (#16779)
* Make /moderate and /admin the same redirect

* Fix view constraint limitations

* Update test
2022-03-03 19:40:03 -05:00
Mac Siri
16cc9014f8
Revert "Remove IE-specific setting (#16073)" (#16719)
This reverts commit 92b1958181.
2022-02-28 11:40:09 -05:00
Michael Kohl
3322b49e84
✂️ Remove myself from core contributors (#16672)
* Remove myself from core contributors

* Update comments

* Update more comments
2022-02-25 09:56:19 -05:00
Dwight Scott
ab224d34b2
Add ability to bulk search tags by name or id (#16671)
* Trigger Build

* Remove cache header before_action and add ability to search by tag name

* Remove cache header before_action and add ability to search by tag name

* Add internal bulk tag endpoint to get tags by array of  names or ids

* Restore V0 tags controller
2022-02-24 12:34:50 -05:00
Michael Kohl
f917a501af
Silence parser/current warnings (#16682) 2022-02-24 21:43:59 +07:00
Suzanne Aitchison
24d02b6a53
Add new ColorPicker to organization settings (#16642)
* Use new color picker in org settings

* add cypress spec

* remove i18n keys no longer needed
2022-02-23 09:05:39 +00:00
Michael Kohl
e1bce8c398
Update device_detector, remove warning workaround (#16665)
Co-authored-by: Dan Uber <dan@forem.com>
2022-02-23 10:13:21 +07:00
Arit Amana
9c92ce03dc
Implement Loom Embed (not merging now) (#16633)
* started implementation and specs

* complete implementation and specs

* refactor

* update doc

* fix failing specs

* typos will NOT be the death of me
2022-02-22 09:05:55 -05:00
Jeremy Friesen
d055613676
Adjusting ArticlePolicy for admin only posting (#16614)
* Adjusting ArticlePolicy for admin only posting

The goal of this commit is actually two fold:

1) To add documentation regarding my current emerging understanding of
   our caching implementation as it relates to our authorization and
   authentication.
2) Flippiing "on" the feature's core authorization check.

Buried within this is the desired normalization of the authorization
between the `ArticlePolicy`'s `#create?`, `#preview?`, `#new?`.

My testing plan for this is to ask for SRE to spin-up a canary, then
test.  What does that look like?  I'm uncertain because this is nudge
closer towards our edge-caching strategy.  Which makes robust testing
more difficult.

Closes forem/forem#16483
Related to #16529, #16571, #16536, #16529
Informs #16490, #16606

* Update spec/requests/editor_spec.rb

Co-authored-by: Jamie Gaskins <jgaskins@hey.com>

Co-authored-by: Jamie Gaskins <jgaskins@hey.com>
2022-02-21 10:09:13 -05:00
Ben Halpern
66b32215f3
Small win: Add "Feature post" button alongside new "admin actions" drawer in mod panel. (#16544)
* Initial hack

* Begin functionality implementation

* Add proper route

* Finish up

* Fix test and formatting

* Fix test vars

* Update app/views/moderations/actions_panel.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/moderations/actions_panel.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/moderations/actions_panel.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/controllers/articles_controller.rb

Co-authored-by: Michael Kohl <me@citizen428.net>

* Update file to not use keys that are not needed

* Finalize featured logic

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Michael Kohl <me@citizen428.net>
2022-02-17 12:43:27 -05:00
Jeremy Friesen
955d9ee51a
Plumbing application for probable AuthN/Z changes (#16571)
* Plumbing application for probable AuthN/Z changes

For further details, core members can read:

- [Forem Article Authorization Discrepencies][1]
- [Forem Authentication and Authorization Principles][2]

(Note: there's nothing "private" about these articles, I happened to
post them on https://forem.team for internal discussion.)

Related to #16529

[1]:https://forem.team/jeremy/forem-article-authorization-discrepencies-45df
[2]:https://forem.team/jeremy/forem-authentication-and-authorization-principles-58l3

* Adding changes based on feedback
2022-02-16 09:10:18 -05:00
Suzanne Aitchison
3982b389f1
Rework user subscription liquid tag to avoid errors (#16460)
* move script to packs, strip ids

* make sure userdata is available before determining ui

* stop working around old html, fix duplicate ID errors

* skip login modal

* remove DEV hard coding

* replace system spec with cypress spec

* update base_data to include apple auth info, add to cypress tests

* add initial version of DUS to resave HTML

* remove data update script
2022-02-15 09:14:03 +00:00
Michael Kohl
d5ecf61ee4
Admin API use case 1: endpoint to create users (#16520) 2022-02-15 09:30:00 +07:00
yheuhtozr
21a0c1a164
add one missing i18n key (fr only) (#16553) 2022-02-14 06:49:59 -07:00
Nick Taylor
bfbe90cfbe
Now Bg color hex is labeled Tag Color (#16492) 2022-02-11 08:31:57 -05:00