Git Product home page Git Product logo

colabsidian-user-manager's Introduction

ColabSidian User Manager

This is the repo for the custom user manager I am writing for ColabSidian. It is used by the SyncServer backend of ColabSidian.

It has a default user. Every connection to the sync server has permissions based on the given permissions for the user it is logged in as. It uses the default user as a fallback/template when creating a new user.

There are 3 ways of logging in.

  • username & password (has specific perms for a singular user)
  • username & key (has specific perms for a singular user)
  • general key (has general perms for everyone with this key, so it can be used as a "guest" user)

The username-dependent login methods can be configured to allow a certain number of connections per user (default 1)

Config

config.json:

{
  "um": {
    "default_perms": 0,
    "general_keys": [],
    "users": []
  },
  "db": { "port": 1337 }
}

'um' and 'db' are separate, so you could use the same config file when you want to use a different DB solution. User:

key           value   description                                                      
useAuthKey bool whether the user authenticates with a cryptographic key
name           str     name of the user                                                  
auth string password or key hash
maxConnection number the maximum number of concurrent connections logged in as this user

um (User Manager)

Perms are stored as a number In JS, numbers aren't ints. So you can imagine each int bit being a flag for a perm.

  • Reading is always permitted.
  • Files and folders are handled the same.
bit flag
0 write to file
1 delete from file
2 create a file
3 move a file
4 delete file

The perm range is 0 - 31

So a user that is allowed to do everything would have the perm-value 31 and a user that is only allowed to read, write & delte from files would have the perm-value 7

todo

Read the todo.md to see what is in planning. (everything in the todo.md should be seen as being considered but not confirmed to be "todo").

colabsidian-user-manager's People

Contributors

peter-schweitzer avatar jeremyssocial avatar

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.