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

Anonymous Can Now Post as Guest When They Select Anonymous. #38

Merged
merged 2 commits into from
Oct 9, 2024

Conversation

Abdallah-Abdaljalil
Copy link
Collaborator

@Abdallah-Abdaljalil Abdallah-Abdaljalil commented Oct 8, 2024

Implemented backend for Anonymous Posts where the user can post anonymously, however, they are displayed as 'Guest'.

  • Modified nodebb-plugin-composer-default/static/lib/composer.j and src/topics/create.js
  • Added a flag to detect when the user selects to post anonymously in composer.js
  • Added an attribute to composerData in composer.js
  • Added conditions in create.js to switch the user id of the user to 0 when anonymous is True

This enhancement allows the user to create a post anonymously which makes the user comfortable when posting.

Resolves Issue #37

@Abdallah-Abdaljalil Abdallah-Abdaljalil added enhancement New feature or request backEnd Issues with backend labels Oct 8, 2024
@Abdallah-Abdaljalil Abdallah-Abdaljalil self-assigned this Oct 8, 2024
@Abdallah-Abdaljalil Abdallah-Abdaljalil linked an issue Oct 8, 2024 that may be closed by this pull request
@coveralls
Copy link

coveralls commented Oct 8, 2024

Pull Request Test Coverage Report for Build 11240808159

Details

  • 2 of 4 (50.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.007%) to 82.667%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/topics/create.js 2 4 50.0%
Totals Coverage Status
Change from base Build 11090114992: -0.007%
Covered Lines: 22335
Relevant Lines: 25598

💛 - Coveralls

Copy link
Collaborator

@khalifat3 khalifat3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Checks if user wants to post as anonymous.
  • set the uid to guest, and reloads the page.

Logic seems fine and it makes sense, user can now post as anonymous user.

@khalifat3 khalifat3 merged commit b70c30f into f24 Oct 9, 2024
1 check passed
@Abdallah-Abdaljalil Abdallah-Abdaljalil added this to the Sprint 2, Week 2 milestone Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backEnd Issues with backend enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User can Post as Guest When They Choose to Post Anonymously
3 participants