Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WJ-1200] Add "site users" #1692

Merged
merged 27 commits into from
Nov 9, 2023
Merged

[WJ-1200] Add "site users" #1692

merged 27 commits into from
Nov 9, 2023

Conversation

emmiegit
Copy link
Member

@emmiegit emmiegit commented Nov 9, 2023

As described in WJ-1200, the "site user" is a special type of user which is created only when a site is, and represents it in totality. All such users have the name site:[slug], for instance site:scp-sandbox-3. This allows us to do things with this virtual user such as sending staff messages from a standard account, forwarding messages received to different assigned staff members, and having one standard user to represent the site itself for matters such as "page whose attribution is staff".

This implements this new user type, adds logic to create it when a site is created, and edits it when a site is edited. Because colons (:) are not normally allowed in user slugs, there is a special exception for this user type.

@emmiegit emmiegit self-assigned this Nov 9, 2023
Copy link

codecov bot commented Nov 9, 2023

Codecov Report

Merging #1692 (008bb95) into develop (4bc5d71) will decrease coverage by 0.42%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1692      +/-   ##
===========================================
- Coverage    40.04%   39.62%   -0.42%     
===========================================
  Files          342      343       +1     
  Lines        10853    10967     +114     
===========================================
  Hits          4346     4346              
- Misses        6507     6621     +114     
Flag Coverage Δ *Carryforward flag
deepwell 2.01% <0.00%> (-0.05%) ⬇️
ftml 76.83% <ø> (ø) Carriedforward from 37602d4

*This pull request uses carry forward flags. Click here to find out more.

Files Coverage Δ
deepwell/src/database/seeder/mod.rs 0.00% <ø> (ø)
deepwell/src/services/error.rs 0.00% <0.00%> (ø)
deepwell/src/services/interaction/mod.rs 0.00% <0.00%> (ø)
deepwell/src/services/interaction/structs.rs 0.00% <0.00%> (ø)
deepwell/src/utils/slug.rs 0.00% <0.00%> (ø)
deepwell/src/services/message/service.rs 0.00% <0.00%> (ø)
deepwell/src/services/user/service.rs 0.00% <0.00%> (ø)
deepwell/src/services/site/service.rs 0.00% <0.00%> (ø)
deepwell/src/services/interaction/site_user.rs 0.00% <0.00%> (ø)

@emmiegit emmiegit merged commit 25cd6ee into develop Nov 9, 2023
7 checks passed
@emmiegit emmiegit deleted the WJ-1200-site-user branch November 9, 2023 21:13
@emmiegit
Copy link
Member Author

emmiegit commented Nov 9, 2023

thanks @Yossipossi1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants