* schema and backend for warning users
* allow warning and warning acknowledgement
* include warning actions in user history drawer
* fix fixture
* add copy to warn modal
* style warning on stream side
* localize strings
* update warning form
* fix fixtures
* copy updates
* clean up error messaging
* userefetch for users
* ensure user status is refreshed on warn error
* add details about warning to user status details
* update copy for unacknowledged warning
* fix merge conflict
* update copy
* remove unused code
* clean up warning css
* sort imports
* fix copy in comments
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* resovle import error by removing useContext from ui component
* update snaps
* create useUIContext hook
* add site and community models
* create sites and communities on install
* add site name to install wizard
* add site id to stories
* pass site id to stream query in embed
* fix spec
* add sites query
* list sites in organization config
* add route for new sites
* add create site mutation
* view and update sites
* show embed codes for sites
* add site id to comments
* allow filtering moderation queues by site id
* add site selector to queue
* move sites config routes
* Revert "move sites config routes"
This reverts commit 4ed5345d3e1df6263f8390b64214956c43c4d8cd.
* update sites routes
* show site name in moderate card
* remove site selector from queue selector
* style create site form
* edit site form
* clean up ts
* move :storyID paths to /storeis/:storyID
* make queues respect site id
* add site switcher
* styles for site selector
* add global notifications
* style app notifications
* clear notifications after x miliseconds
* use notification component in add site form
* fix types
* make notifications dismissable
* dismiss site created notification
* remove button letter spacing if lowercase
* filter stories by site in search
* add site name to story search results
* add site column to stories table
* filter stories table by site
* make sure notification displays after site creation
* paginate sites table
* paginage site selector
* add paginated site filter to stories table
* fix merge conflicts
* sort by createdAt
* default to 20 sites
* delete comments
* add translation tags
* make site ID not mandatory
* Fix tests and specs
* only include site id in embed code for multisite
* update tenant cache when adding first site
* only show site selector if multiple sites
* use story url instead of site id for story upsert
* update snaps
* make ui conditional on multisite
* update snaps and remove unnecessary site ID
* sloppily calculate counts for filtered queues
* get origins of allowed domains
* add migration
* enable migration
* only show permitted domains if mulltisite is false
* remove site id from embed code
* update snaps
* undo updates to singletonresolver
* remove refernces to communities
* fix mints
* remove community reference
* update copy in installation
* use sites services in installer
* remove unused loader
* correct error text for useNotification
* order sites by name
* make multisite a computed property
* use map/filter instead of for/of for url origins
* add missing/incorrect translations
* remove references to siteID
* remove references to tenant isURLpermitted
* add comments to schema updates
* simplify filtering stories by site
* remove domains config from advanced
* fix: adjusted CSP header generation
* add migration to create indexes on site
* clear notifications on navigate
* remove count for filtering by site
* throw duplicate error for allowed domains
* handle errors for create/update sites
* remove contacturl and contactemail from sites
* fix types for counts
* sort imports
* ensure props get passed down to link version of button component
* add url and email fields back into organization config
* sort imports
* fix moderation queues resolver types
* fix appearance of sites dropdown
* add status role to notificaiton
* remove duplicate layout file
* fix: rename allowedDomains -> allowdOrigins
* move Link conditional from button to basebutton component
* fix merge conflict
* fix mutation optimistic response
* make sure to prop gets passed to link
* change labels on install steps
* show story's site in site selector when moderating by story
* feat: support site counting
* update snap
* remove multisite from settings
* move paginated select to admin/components
* fix circular import errors
* remove uicontext component from v2 timestamp
Co-authored-by: Wyatt Johnson <accounts+github@wyattjoh.ca>
* feat: improved api for reloading tenants for cli
* fix: cleaned up merge beheviour
* feat: added support for stream/story edge
* feat: support tenant install
* fix: updated snapshot
* fix: fixed tests
* add types for setting user premod
* add types, fields, and mutations for user premod
* enforce premoderation on users marked premod
* add user premod to dropdown
* update specs
* fix tests
* update premod workflow to match v4
* allow user filtering by premod status
* add premod user history to account actions drawer
* update snaps
* fix permissions on new premod fields
* update strings
* fix tests
* clean up formatting and copy
* fix: nullable fixes pre-migration
* feat: enable persisted queries on the client
* fix: use `id` inside websocket message
* feat: initial server support for PQ
* feat: deeper server support
* feat: abstracted persisted query replacing logic
* add types for username updates
* add update username methods
* add types and resolvers for username history
* connect frontend to username history and change history mutation
* style update username box
* show username changes in user history drawer
* new users have 1 username entry
* add translations for username change
* allow new users to change username once
* add tests for change username ui
* send email to users after username change
* add types to tests
* treat status.username.history as mandatory
* remove hardcoded 14 day username update frequency
* use framework translation directives
* add account history action component
* clean up strings
* fix imports in change username container
* fix templates
* rename update username methods
* fix nunjucks formatting
* add warning if user missing email
* add fixme
* fix spacing
* feat: added cookie support to coral
* feat: adapt client to use cookies
* fix: safari input styles
* fix: lint
* fix: linting
* fix: support clearing cookies properly, oauth
* feat: support cookies for websocket upgrade requests
* fix: lint
* fix: tests
* Throw error if user tries to ignore a staff member
Throws a UserCannotBeIgnoredError if a user tries to ignore
a user who is a staff member. A staff member in this case is
considered anyone who has a role of staff, moderator, or admin.
CORL-409
* Prevent users from ignoring staff in the user info popover
Creates the staff roles in a constant next to the user model.
Uses this to add a computed property to the user resolver.
CORL-409
* Remove unnecessary async declaration from userIsStaff helper function
CORL-409
* Specify ignoreable on users in client test fixtures
Allows the tests to pass for the required computed property
of ignoreable that is computed by whether a user is a staff
member or not.
CORL-409
* Update more fixtures with ignoreable property on mocked users/commenters
CORL-409
* Consolidate ignore-able calculation into re-usable helper methods
Re-use the logic for whether a role is a staff member to
clearly define when a user is ignore-able or not across the
business logic.
CORL-409
* Set the ignoreable optimisticResponse on comment mutations
We have set the ignoreable value in the graphQL schema, so now
the optimisticResponses are looking for a default value to use
until the data result arrives. Put to false since the ignoreable
value is set on our author, we likely don't want to ignore ourselves.
CORL-409
* feat: suspending, banning, now propogation
* feat: adapting to `now`
* feat: support auth for suspension/banned
* feat: added trace-id to requests
* feat: new mutation api with hooks support
* feat: added user status filtering, current field
* feat: Implement filter by status, adapt to new USER_STATUS type, add lookup helper <3
* fix: typo
* fix: tests
* chore: rename banned status to ban status
* test: feature test + lots of test helper improvements e.g. types
* fix: add translation to ban user modal
* fix: translation
* fix: test
* feat: Handle server errors in client
* refactor: use enum ERROR_TYPES
* chore: better comment
* fix: lint
* fix: also look in queries for custom errors