Commit graph

9389 commits

Author SHA1 Message Date
snipe e2d5401f3a Stop double-loading jquery 2017-01-11 05:51:13 -08:00
Daniel Meltzer 9bbfb64f17 Add a use declaration to Userscontroller to prevent assigning the wrong item_type. Should fix/prevent #3160 (#3168) 2017-01-11 04:27:05 -08:00
snipe 84154d936a Added self.api permission 2017-01-11 04:05:39 -08:00
snipe 57d0eba58f API blade cleanup 2017-01-11 04:05:32 -08:00
snipe a02f406fa6 Removed personal access token from settings api page 2017-01-11 03:58:09 -08:00
snipe 19fcda5c25 Basic API management
I’m getting a 500 on personal token creation, but there’s nothing in the logs, so I have no idea what’s wrong
2017-01-11 03:55:47 -08:00
snipe b5ddd9ab0a More vue/api work 2017-01-11 03:38:55 -08:00
snipe d14ed4a73c Bower components 2017-01-11 03:05:06 -08:00
snipe 33ffc58ffe Fixed vue issue with api 2017-01-11 01:27:02 -08:00
snipe 11d86d83b6 Fixing JS to actually use vue 2017-01-11 01:02:32 -08:00
snipe c99f9e321f Temprarily disable auto-phpcs 2017-01-10 23:22:00 -08:00
snipe b7bbc44052 Removed unneeded use statement 2017-01-10 23:21:47 -08:00
morph027 734e87f85f Installer fine tuning (#2993)
* used shellcheck to lint snipeit.sh

* do not depend on lsb-release command

* add lsb codename

* really use perms()

* more fixes

* quiet apt

* silent logging using log()

* start mysql if not running

* added curl to ubuntu

* added logfile to log function

* update apt index after adding mariadb repo

* fixed typo

* review fixes
2017-01-10 23:07:06 -08:00
snipe f371c5fd62 Merge branch 'master' of github.com:snipe/snipe-it 2017-01-10 19:02:18 -08:00
snipe 4b3edbd2f5 Fixed #3130 - model ID not being saved weith model info on modal for create asset 2017-01-10 19:02:13 -08:00
snipe 34a9564f30 Updated language strings 2017-01-10 17:53:06 -08:00
snipe 3060de8e0c Merge branch 'develop' of github.com:snipe/snipe-it into develop 2017-01-10 17:11:11 -08:00
Byron Wolfman 1f3106b9da Use debian base container and clean up apt-get (#3011)
* Use debian base container and clean up apt-get

Attempt to slim down the docker image by replacing ubuntu:trusty with debian:jessie and clean up after apt-get invocation. Building against the 3.6.0 commit shows a healthy reduction of 44MB, or 9%, compared to the ubuntu-based image.

* Use debian:jessie-slim for an even smaller image

If we're using a debian base image for sizing reasons, we may as well go the full distance and use debian-slim.
2017-01-10 16:22:06 -08:00
Daniel Meltzer 44683c784f Importer: Add License Importer and refactor (#3143)
* Major code simplification of the importers.

Move towards using Model::fill and Model::update rather than reinventing
the wheel.  This makes the updating/creating logic a lot clearer, and
allows for the deletion of a lot of code.  Also allows for supporting of
more fields in the future really easily.

* Cleanup constructors and use setters instead.

* Set the LC_MONETARY locale, and use it to strip currency symbols in Helper::parseFloat()

* Move licenseseat creation/deletion logic into an event handler on the model rather than the controller.

* Move the logging of parsed values to array_smart_fetch rather than writing it out everywhere

* Move to storing dates as carbon rather than strings.  Allows for the parsing of more arbitrary strings from the importer

* Add a license importer with support for checking out to users or assets.

* Make a directory for sample/mock import csvs and populate it

* Adjust how we store/retrieve dates to fix some issues the tests found.
2017-01-10 16:19:18 -08:00
snipe b4bed2a11f Move cipher into the .env 2017-01-09 19:41:24 -08:00
snipe 57d2b88900 Remove number formatting 2017-01-06 03:14:32 -08:00
snipe 9fd3a9a82d Removed logging 2017-01-06 03:12:49 -08:00
snipe a6e6991a2d Removed second number_format 2017-01-06 03:11:27 -08:00
snipe 93ba0717d8 Removed number_format 2017-01-06 03:02:38 -08:00
snipe 208ccab4c1 Fixes #3104, #2914 and #2918 - auto-increment incorrectly generating next ID 2017-01-06 02:54:06 -08:00
snipe a8839e0ef4 Fixes #3104, #2914 and #2918 - auto-increment incorrectly generating next ID 2017-01-06 02:52:10 -08:00
snipe 3e4152c966 Bumped version 2017-01-06 00:04:26 -08:00
snipe 1bf34d73f5 Use correct authorize rule in middleware for user delete 2017-01-06 00:02:46 -08:00
snipe d1e360d64d Fix logic to use gate instead of asking if superuser 2017-01-06 00:02:19 -08:00
snipe 3b5b19848c Added oauth keys to gitignore 2017-01-06 00:01:55 -08:00
Daniel Meltzer 6ce20c32b1 Component Importer and various Importer Fixes (#3132)
* Importer fix: we were trimming the wrong part of the classname when creating a category.  This led to categories not being recognized.

* Add a component importer.  Uses same fields as consumable importer.  Only trick: If an asset_tag is present, we checkout a component to that asset on import

Enable component importer.  Also calculate the importer classname in a cleaner fashion.

* Fix comparisons.  find can return an index of 0, which is falsy.
2017-01-05 15:45:12 -08:00
Daniel Meltzer 816d2fd095 More minor fixes (#3126)
* Update composer phpcs

* Minor Fixes found while working.
ALlow user_id to be nullable in category model validation

Point to the correct route in accessoriespresenter datatable.  Also add name() method

Add a translated category name

Fix typo in translation

* Add a method to the asset presenter to show deployed when asset is deployed.  Fixes #3114
2017-01-03 16:55:43 -08:00
Bob Clough f999c797e5 Allow a license to be pre-checked-out to an asset. (#3124)
Some licenses, such as windows licenses, are machine specific.  This
commit allows an extra field to be added to the license importer to
allow these licenses to be imported and attached directly to an asset
2017-01-03 16:55:21 -08:00
snipe 6351746c62 Bumped to v4.0-develop 2016-12-30 16:28:47 -08:00
Daniel Meltzer 3a6bbcc615 More improvements (#3116)
* Restore display of deleted items in the logs

* Fix functional tests.
2016-12-30 11:44:47 -08:00
Daniel Meltzer 8a782bf34a Present assetlogs (#3112)
* Set user if asset is checked out to user.  fixes email problems.

* Use sometimes validation to ignore this when no values are present.

* Move Actionlog details to a presenter and port the activity table to use it.  Still need to port other parts of the application, but this consolidates a lot of logic.

* Attempt test fix

* Port users,licenses, and assets view to use the presenter to generate table values.
2016-12-29 22:23:36 -08:00
snipe 6029bea2de Fixed error if user not set 2016-12-29 18:19:08 -08:00
Daniel Meltzer 4ad9c3623e Show a glyph in the assets datatable. (#3111) 2016-12-29 18:12:27 -08:00
snipe 4c5fce847b Removed user “new” buttons next to non-user options 2016-12-29 17:41:39 -08:00
snipe 0581499029 Fixed migration 2016-12-29 17:26:50 -08:00
snipe 16bd78fb3f Removed stray poop 2016-12-29 17:26:21 -08:00
snipe 199fdf39ec Merge branch 'dmeltzer-checkout-to-things-v1' into develop 2016-12-29 16:20:37 -08:00
snipe 221cf1f9c8 Merge branch 'checkout-to-things-v1' of https://github.com/dmeltzer/snipe-it into dmeltzer-checkout-to-things-v1
# Conflicts:
#	app/Http/Controllers/AssetsController.php
#	app/Http/Controllers/ReportsController.php
#	app/Http/Controllers/UsersController.php
#	app/Presenters/AssetPresenter.php
2016-12-29 16:20:17 -08:00
Daniel Meltzer ce8eda1325 Fix some accessory sorting (#3108)
Fixes at least some of #3045
2016-12-29 15:50:18 -08:00
snipe 51ceaedfaf Small phpcbf cleanup 2016-12-29 14:02:18 -08:00
Daniel Meltzer 62dd474d44 Update dump with new migration. 2016-12-29 14:06:16 -05:00
Daniel Meltzer aa2d3cf026 The assets method was renamed to assignedAssets in User class. Adjust places to reflect that 2016-12-29 11:45:37 -05:00
Daniel Meltzer fa974b93c0 This authorization is now handled in the controller. 2016-12-29 11:44:34 -05:00
Daniel Meltzer 13b51bc934 Allow checkout of item to things on create page. Need to test validation better and maybe extract code to one place for checkout.blade and edit.blade 2016-12-29 11:10:52 -05:00
Daniel Meltzer 7ccd71978c Cleanup checkedout to part of asset view. 2016-12-29 09:56:19 -05:00