Skip to content

PyJONDB

Compare
Choose a tag to compare
@t-a-g-o t-a-g-o released this 01 Jun 06:07
· 2 commits to main since this release

Authentication and Authorization

  • Authentication and authorization mechanisms have been implemented for database operations.
  • A new init class has been introduced, which handles authentication and authorization.
  • The __init__ method of the init class takes an additional parameter auth, which is an authentication object.
  • Most methods in the init class now require a session_id parameter, which is used to authenticate and authorize the user before performing the operation.
  • If the user is not authenticated or authorized, a PermissionError exception is raised.
  • The create_collection method now checks if the user has the 'admin' role before allowing the creation of a new collection.

Code Organization

  • The database class from the old version has been renamed to init.
  • The create, read, write, create_collection, read_collection, write_collection, add_document, find_document, query, update_document, delete_document, link_collections, create_tree, and aggregate methods have been moved to the init class.

Minor Changes

  • The ASCII art banner at the top of the file has been updated with version information.
  • Some formatting and indentation changes have been made.