No description
Find a file
Daniel Uber c489971ecf
Allow admin control of auth broadcast messages (was: Don't suggest apple authentication) (#16069)
* Don't send auth broadcasts for providers that are in beta

Currently we have :apple as a restricted provider (you can enable it,
but it's treated as beta here, rather than generally available).

While we were correctly checking if you had all GA providers enabled
in authenticated_with_all_providers?, we were incorrectly pulling
all enabled provider names in find_auth_broadcast (the message to send
the user), and picking apple_connect.

Since it doesn't make sense to omit apple id login from consideration
when checking if all available auth methods are used, then recommend
that it be used consistently, capture this "GA" state as a method, and
use it both in the test "does this user have all available identity
providers enabled?" and the selection "which identity provider can I
suggest they setup?" consistently.

Since we're about to enable google as an auth source (in #15986) I'll
check with Josh if he expects this to be GA on release or in limited
beta.

* Clean up authenticated_with_all_providers?

We have a method identities that returns the enabled identities for
the user (a relation), and a method ga_providers that returns a list
of enabled and not beta provider symbols.

Change the set difference to use Array#all? (which will exit early on
the first failure). Efficiency note: while I think this reads
better,it's possible this issues a number of small (cheap) queries for
identity by user id and provider id, but there's a unique index on
(provider, user_id) that should be effective.

* Only check providers that have active broadcast messages

An admin can stop sending "connect using apple" follow ups by
disabling that broadcast.

I randomized the enabled/active broadcasts for connection options so
they're not always pulling the same (facebook? apple?) option every
time.

* Clean up lost thought in comment
2022-01-12 09:59:14 -06:00
.buildkite
.gems
.github Update dependabot config (#15987) 2022-01-10 11:35:48 +07:00
.husky
.vscode
.yarn/releases
app Allow admin control of auth broadcast messages (was: Don't suggest apple authentication) (#16069) 2022-01-12 09:59:14 -06:00
bin Copy .env_sample to .env in bin/setup (#16005) 2022-01-10 21:33:08 +07:00
config Don't load ActiveJob railtie (#16074) 2022-01-12 22:29:54 +07:00
cypress Remove Setup Banner (VerifySetupCompleted) (#15969) 2022-01-10 10:30:05 -07:00
datadog
db Add apple_connect welcome notification broadcast (#16063) 2022-01-11 14:34:19 -06:00
lib Add apple_connect welcome notification broadcast (#16063) 2022-01-11 14:34:19 -06:00
log
public
scripts Don't write a \n at the end of the release version (#15659) 2021-12-03 13:08:27 -05:00
spec Moving the "Null" user object closer to User (#16070) 2022-01-12 08:45:01 -05:00
vendor Bump bootsnap from 1.9.3 to 1.9.4 (#16058) 2022-01-11 11:53:06 -07:00
.codeclimate.yml
.dockerignore
.editorconfig
.env_sample Skip google analytics when ga_tracking_id is nil (#15967) 2022-01-06 12:21:07 -05:00
.erb-lint.yml
.eslintignore
.eslintrc.js Bump eslint from 7.32.0 to 8.6.0 (#15926) 2022-01-05 13:47:40 -05:00
.gitattributes
.gitignore
.gitpod.dockerfile Update to node version 16 (#15522) 2022-01-03 10:23:07 -06:00
.gitpod.yml Add DISABLE_SPRING environment variable to gitpod forem server task (#15807) 2021-12-16 15:24:22 -06:00
.lintstagedrc.js
.nvmrc Update to node version 16 (#15522) 2022-01-03 10:23:07 -06:00
.postcssrc.yml
.prettierignore
.prettierrc.json
.rspec
.rubocop.yml Proposing a new feed experiment (#15789) 2022-01-03 14:38:14 -05:00
.rubocop_todo.yml
.ruby-version
.simplecov
.slugignore
.travis.yml Data Update Script to migrate logo_svg contents to png file (Will be merged and deployed on 10/01) (#15710) 2022-01-10 16:09:34 +02:00
.yardopts
.yarnclean
.yarnrc
babel.config.js
CHANGELOG.md
CODE_OF_CONDUCT.md
config.ru
container-compose.yml
Containerfile use newly-built Fedora-35-based quay.io/forem/ruby:3.0.2 container (#15938) 2022-01-03 15:31:42 -06:00
CONTRIBUTING.md
customJsDomEnvironment.js
cypress.dev.json
cypress.json
docker-compose.yml
Dockerfile
empty-module.js
Gemfile Bump inline_svg from 1.7.2 to 1.8.0 (#16010) 2022-01-10 06:55:26 -07:00
Gemfile.lock Bump bootsnap from 1.9.3 to 1.9.4 (#16058) 2022-01-11 11:53:06 -07:00
gitpod-init.sh
Guardfile
jest.config.js
jsconfig.json
LICENSE.md
package.json Bump @storybook/preact from 6.4.9 to 6.4.10 (#16040) 2022-01-11 10:06:01 +00:00
postcss.config.js
Procfile
Procfile.dev
Procfile.dev-hot
Rakefile
README.md Add me (Dwight) to readme :) (#15816) 2021-12-17 14:50:45 -05:00
release-tasks.sh
SECURITY.md
svgo.config.js
testSetup.js
yarn.lock Bump @storybook/preact from 6.4.9 to 6.4.10 (#16040) 2022-01-11 10:06:01 +00:00


Forem 🌱

For Empowering Community

Travis Status for forem/forem GitHub commit activity GitHub issues ready for dev GitPod badge

Welcome to the Forem codebase, the platform that powers dev.to. We are so excited to have you. With your help, we can build out Forems usability, scalability, and stability to better serve our communities.

What is Forem?

Forem is open source software for building communities. Communities for your peers, customers, fanbases, families, friends, and any other time and space where people need to come together to be part of a collective. See our announcement post for a high-level overview of what Forem is.

dev.to (or just DEV) is hosted by Forem. It is a community of software developers who write articles, take part in discussions, and build their professional profiles. We value supportive and constructive dialogue in the pursuit of great code and career growth for all members. The ecosystem spans from beginner to advanced developers, and all are welcome to find their place within our community. ❤️

Table of Contents

Community

For a place to have open discussions on features, voice your ideas, or get help with general questions please visit our community at forem.dev.

Contributing

We encourage you to contribute to Forem! Please check out the Contributing to Forem guide for guidelines about how to proceed.

Getting Started

This section provides a high-level quick start guide. If you're looking for a more thorough installation guide (for example with macOS, you'll want to refer to our complete Developer Documentation.

We run on a Rails backend, and we are currently transitioning to a Preact-first frontend.

A more complete overview of our stack is available in our docs.

Prerequisites

Local

Containers

Linux

OS X

Installation Documentation

Please see our installation guides, such as the one for macOS.

Developer Documentation

Check out our dedicated docs page for more technical documentation.

Core team

Vulnerability disclosure

Forem is the open source software which powers DEV.

We welcome security research on DEV under the terms of our vulnerability disclosure policy.

Acknowledgments

Thank you to the Twemoji project for the usage of their emojis.

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Please see the LICENSE file in our repository for the full text.

Like many open source projects, we require that contributors provide us with a Contributor License Agreement (CLA). By submitting code to the Forem project, you are granting us a right to use that code under the terms of the CLA.

Our version of the CLA was adapted from the Microsoft Contributor License Agreement, which they generously made available to the public domain under Creative Commons CC0 1.0 Universal.

Any questions, please refer to our license FAQ doc or email yo@dev.to.


Sloan, the sloth mascot
Happy Coding ❤️

⬆ Back to Top