Git Product home page Git Product logo

Comments (2)

priyank-purohit avatar priyank-purohit commented on May 18, 2024

Hey, sorry the documentation is still in progress (progress is pretty much halted right now due to work). But give me until tomorrow evening, I'll reply here with the information you need.

But basically, it's a psql function, and a setting in the config.json file before the feature can work correctly. Also, of course, you'd need to configure HTTPS and what not to ensure basic security.

from postgui.

priyank-purohit avatar priyank-purohit commented on May 18, 2024

To be able to edit a table: the table must have primary key defined + a primary key function also must exist in the database + the user must also have edit privileges.

  1. /data/config.json should have the following settings to indicate the db has the primary_keys() function:
{
    databases: [
        url: "https://...",
        "primaryKeyFunction": true,
        "foreignKeySearch": true
}
  1. Execute the 4 SQL scripts available in the repository at /scripts. They are:
  • Authentication.sql (change the secret on line 104, and the credentials on lines 115-117) (Creates the auth framework using the db to validate credentials)
  • CREATE FUNCTION.sql (has the primary_keys() function which allows the front-end to uniquely identify one row to edit it) (foreign_keys() function is optional for the search box)
  • CREATE_ROLE.sql (change database and table names as necessary) (grants privileges to read and edit users)
  • CREATE TABLE change_log.sql (to keep track of edits made to the database)
  1. Then you can login using the edituser credentials defined in Authentication.sql file.

I could've used a commercial paid/free auth services but I wanted the PostgreSQL db to contain everything needed to share data including all authentication services. Apologies for the late response.

from postgui.

Related Issues (9)

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.