Giter Club home page Giter Club logo

flying-unicorn's Introduction

Hi ๐Ÿ‘‹, I'm William Duyck

A crazed software engineer from London

๐Ÿš€ Languages and Tools I Use

javascript typescript php vuejs sass bootstrap css3 html5 tailwind nodejs express mysql redis mariadb sqlite chartjs d3js docker bash laravel codeigniter mocha karma illustrator jekyll linux git

โšก๏ธ Where to find me

twitter linkedin codepen

fuzzyfox

fuzzyfox

fuzzyfox

โค๏ธ Support Me

ko-fi

flying-unicorn's People

Contributors

fuzzyfox avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

flying-unicorn's Issues

Add OIDC functionality

Allow login using a OIDC IDp (like auth0)
Use this to auth based on email address and pickup groups
Allow config for which claims to map to user values

Create AdditionalFields

Create the additional fields model so that it works as intended, and allows for the addition of any field to any entity.

Validation

Field validators should use the Laravel Validation Rules and be injected into the rules in the Store + Update requests.

Permissions

The ability to get / set any of these additional fields is based on the entity it is attached to, and the slug stored on the field definition is appended to the permissions for the entity.

For example, if we add a tito_id field to users, and ommit the slug, then the ability to set / get the field is based on the permissions:

  • [own.]users.index
  • [own.]users.store
  • [own.]users.show
  • [own.]users.update
  • [own.]users.destroy

However if the slug is stored (e.g. tito) the permissions for getting / setting become:

  • [own.]users.index.tito
  • [own.]users.store.tito
  • [own.]users.show.tito
  • [own.]users.update.tito
  • [own.]users.destroy.tito

ERD

Below is a simplified version of the table(s) and their relations. There are additional fields on each table used for tracking who added/updated the field defintions + when.

 +----------------+            +---------------------+          +-------------------+
 |AdditionalField |            |AdditionalFieldValue |          |Entity (e.g. User) |
 +----------------+            +---------------------+          +-------------------+
 |id              |<-----------+additional_field_id  |    +---->|id                 |
 |key             |            |entity_id            +----+     |name               |
 |type            |            |value                |          |email              |
 |entity          |            |                     |          |password           |
 +>alidator       |            +---------------------+          |                   |
 |permission_slug |                                             +-------------------+
 |                |
 +----------------+

ToDo

  • Setup model
  • Create trait for adding to other models
  • Create controller
    • index
    • store
    • show
    • update
    • destroy
  • Validate additional fields on store/update requests
  • Create/Update additional fields on store/update requests

Create basic endpoints for comments

Create CRUD endpoints for comments.

Note: user_id field only available on store action. Not available for update action. This is to allow for annonymous comments.

Requires:

  • Comments Policy

Create basic endpoints for "do not disturbs"

Create CRUD endpoints for do not disturbs.

Note: user_id field only available to admins. Automatically sets to creating user if not given over API.

Permission: donotdisturbs.store.user_id

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.