Git Product home page Git Product logo

central-command's Introduction

unitystation

Codacy Badge Tests GitHub last commit Discord License: AGPL v3

CONTAINS BUILT WITH

Unitystation has been active since late 2016

Visit us on Steam:

Support us on Patreon:

Also, Check our progress on our blog and changelog page.

Join the community

Talk to us on Discord:

Feel like getting involved?

Read our Quick Start guide here

  1. Get Unity Hub
  2. Install editor version 2023.2.20f1
  3. Fork the repo
  4. Add your changes
  5. Read the contribution guidelines
  6. Submit a pull request

Warning

It is highly recommended to run the Unitystation project on an SSD in the editor.

Note

The first-time import process will take a while. Depending on your system configuration, This process could take up to 1 hour or 15 minutes. Subsequent launches of the project should take a maximum of a minute.

LICENSE

All code after commit 44695c862d6d84cfc99354d6dfba1f0b70f20407 on 2017/03/12 at 11:39 PM CET is licensed under GNU AGPL v3.

All code before commit 44695c862d6d84cfc99354d6dfba1f0b70f20407 on 2017/03/12 at 11:39 PM CET is licensed under GNU GPL v3. If you have committed code to this repository before this time, please contact us if you want your code distributed under GNU AGPL v3 instead (Including tools unless their readme specifies otherwise.)

See LICENCE for more details.

All assets including icons and sound are under a Creative Commons 3.0 BY-SA license unless otherwise indicated.

cc-by-sa

central-command's People

Contributors

bod9001 avatar corp-0 avatar dependabot[bot] avatar dooblynoobly avatar fogapod avatar maxisjoe avatar semantic-release-bot avatar sweep-ai[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

central-command's Issues

Consider migrating hub visibility api to this

I think it is worth to make this service the main service and only one needed to work. Right now we're doing hub visibility and server data using a different api which btw doesn't even have CRUDs and is quite unsafe.

Finish the account schema

  • email: unique, not blank as login field
  • password: set basic password rules
  • account name: not unique, not blank
  • character settings: understand how the character serialization is done currently

Explore implementing these:

  • account karma: numeric, let players reward other players with karma
  • playtime per job
  • set some basic validations on account name to avoid gamer words

Sweep: email template for confirmation does not exist

Exception in thread Thread-1 (sendConfirm_thread):,
Traceback (most recent call last):,
  File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner,
    self.run(),
  File "/usr/local/lib/python3.10/threading.py", line 953, in run,
    self._target(*self._args, **self._kwargs),
  File "/usr/local/lib/python3.10/site-packages/django_email_verification/Confirm.py", line 73, in sendConfirm_thread,
    html = render_to_string(mail_html, {'link': link}),
  File "/usr/local/lib/python3.10/site-packages/django/template/loader.py", line 61, in render_to_string,
    template = get_template(template_name, using=using),
  File "/usr/local/lib/python3.10/site-packages/django/template/loader.py", line 19, in get_template,
    raise TemplateDoesNotExist(template_name, chain=chain),
django.template.exceptions.TemplateDoesNotExist: registration/confirmation_email.html

When creating a new account, the confirmation mail fails because there is no template at the provided path.

To fix this, go to settings.py and modify the TEMPLATES variable so it looks for a templates folder at the base directory.
Then make EMAIL_PAGE_TEMPLATE variable point to a newly created confirm_template.html file.

Please also write a simple but nice template.

Checklist
  • Create src/templates/confirm_template.htmle91b685
  • Check src/templates/confirm_template.html
  • Modify src/central_command/settings.py98cf320
  • Check src/central_command/settings.py

Flowchart

Username regex issue

test-account as a username is considered invalid when registering an account: regex issue.

Reduce docker image size

Right now we use the main Python image which is done with Ubuntu as a base, leaving us with around 1 GB of bloat. I tried doing the Python:3.8-alpine one but kept getting errors when installing dependencies.

Fix the issues and use alpine or find an option to reduce the image size as much as possible.

Registering an account using the api endpoint is not requiring mail confirmation

  1. Send a post call with your data to the endpoint
  2. if fields are valid, you get the success response
  3. your new account is immediately active and didn't require mail confirmation

Expected behavior:

  1. Send a post call with your data to the endpoint
  2. if fields are valid, you get the success response
  3. your new account is inactive
  4. new token is generated and you get an email to confirm your mail. Once that is done, account is finally active.

Use a property to tag accounts that haven't confirmed mail

Right now the "active" property is used for this purpose. This is inconvenient because users are unable to login and don't get any prompt on why could that be. Instead use another bool property on Account to tag it as confirmed. While not confirmed, allow them to login but redirect them to a view telling them to confirm or resend the mail confirmation.

fix CI/CD chaos

Releases stopped workjng. It is pulling from a ghost environmental variable DOCKER_IMAGE with value "unitystation/unitystaion_auth" which doesn't exist anymore. It also has an old node version.

Sweep: add unit tests for all business logic in the project has missing unit tests

Checklist
  • src/persistence/tests.py ⚠️ No Changes Made
  • src/persistence/tests.py ❌ Sandbox failed so I made additional changes
  • src/persistence/tests.py ❌ Sandbox failed so I made additional changes
  • src/persistence/tests.py ❌ Sandbox failed so I made additional changes
  • src/persistence/tests.py ❌ Sandbox failed so I made additional changes
  • src/persistence/tests.py ❌ Sandbox failed so I made additional changes
  • src/persistence/tests.py ❌ Sandbox failed so I made additional changes
  • src/persistence/tests.py ❌ Sandbox failed so I made additional changes
  • src/accounts/tests.py
  • .pre-commit-config.yaml ✅ Commit 208d865

Flowchart

Finish the auth related endpoints

  • Register a new account api/register
  • Login into an account api/login
  • Update account data api/update

For login, set the token generation and store on client machine. Read it again to keep them authenticated without asking for credentials. Set a sensible expiration time for the token.

Improve error message for disabled account login

  • The error message when attempting a login on a disabled account could be improved:
    "error": "{'non_field_errors': [ErrorDetail(string='Unable to login with provided credentials.', code='invalid')]}
    "This account is disabled." would be more informative.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.