Git Product home page Git Product logo

documents's Introduction

Documents

Codacy Badge Codacy Badge StyleCI License Total Downloads Latest Stable Version

Documents Manager for Laravel Enso.

This package works exclusively within the Enso ecosystem.

There is a front end implementation for this this api in the accessories package.

For live examples and demos, you may visit laravel-enso.com

Watch the demo

click on the photo to view a short demo in compatible browsers

Installation, Configuration & Usage

Be sure to check out the full documentation for this package available at docs.laravel-enso.com

Contributions

are welcome. Pull requests are great, but issues are good too.

License

This package is released under the MIT license.

documents's People

Contributors

abdullahiabdulkabir avatar aocneanu avatar codacy-badger avatar gandesc avatar gitmanuela avatar jlsjonas avatar raftx24 avatar stylecibot avatar vmcvlad avatar y0net avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

documents's Issues

Destroy (and possibly other) icons don't hide with insufficient permissions

This is a bug / feature request. (kept bug as it's causing a hidden error when trying to delete without permissions)

Prerequisites

yes

Description

f.e. if core.documents.destroy permissions are not given to a role, the trash icon is still showing (Documents.vue) even though it behind-the-scenes just causes an error (not visible to the user, only in console)

Steps to Reproduce

  1. user without core.documents.destroy permission
  2. upload a document & try to destroy it

Expected behavior

icon to be hidden

Actual behavior

hidden error, broken UX

FilePolicy blocks access to shared documentables

This is a bug | feature request. (up for interpretation ๐Ÿ˜… )

Prerequisites

  • Are you running the latest version?
  • Are you reporting to the correct repository?
  • Did you check the documentation?
  • Did you perform a cursory search?

Description

vendor/laravel-enso/filemanager/src/app/Policies/FilePolicy.php (which from what I can see isn't overruled for Documentables) doesn't take into account the permission-level the user has on a model with documentable trait.

Steps to Reproduce

  1. Upload a document on a Model with Documentable trait
  2. log in with a user that has access to that model's instance; but is not a supervisor or admin role (use-case: we have multiple supervisor levels & will have shared document sections for all users)

Expected behavior

being able to open the attached document

Actual behavior

403 Forbidden

p.s.: sorry if I'm missing something obvious, as I can't imagine there's no way around this by design

Problem with UUID in the models

This is a bug or feature request.

Prerequisites

  • Are you running the latest version?
  • Are you reporting to the correct repository?
  • Did you check the documentation?
  • Did you perform a cursory search?

Description

Is there a possibility that UUID can be used in the models? In all my models I use UUID and when I try to use the package in any of these models it gives error in console prop "id". Expected Number
And then at the time of saving it gives this other error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'documentable_id' at row 1
Obviously all this happens because the wait as id a number and I send a string of the UUID

captura de pantalla de 2018-09-13 20-47-39

Customize document box

Feature reques

Prerequisites

  • [+] Are you running the latest version?
  • [+] Are you reporting to the correct repository?
  • [+] Did you check the documentation?
  • [+] Did you perform a cursory search?

Description

I have a problem. How can I add custom action button to document box or "event on click" to title, image or column (file box). I want to make a checkbox "selected file" then i need to get selected file "id" and that'll.

Upgrade Steps existing Documents

I'm having a little trouble getting Documents to work after upgrading from an older version and am having difficulty understanding the upgrade steps.

Running the artisan upgrade:enso results in the following error when running processing the Avatars model.

File path is starting

   Error 

  Class name must be a valid object or a string

  at vendor/laravel-enso/files/src/Upgrades/FilePath.php:75
     71โ–•     private function folder(string $type): string
     72โ–•     {
     73โ–•         $model = Relation::getMorphedModel($type);
     74โ–• 
  โžœ  75โ–•         return (new $model())->folder();
     76โ–•     }
     77โ–• }
     78โ–• 

      +26 vendor frames 
  27  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()

In my PrestoAdmission.php model, I've added the CascadesMorphMap trait as mentioned in the change log and additionally the morphMap in the AppServiceProvider of my application. However I'm still unable to pull back existing document relations from the model.

Do I need to update the documentable_type column's data to reflect the morphMap short keys? I'm a little confused and the documentation is hard for me to understand the correct procedure for upgrading.

Any help would be most appreciated.

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.