Commit graph

454 commits

Author SHA1 Message Date
snipe b450ef3534 Cast group permissions as array for older, wonky installs 2016-08-30 13:25:14 -07:00
snipe 2c18bc24a7 Check if username is userprincipalname
If it is, skip building the UPN for AD
2016-08-30 08:34:17 -07:00
snipe 4dff58ec26 Fix array generation for select 2016-08-25 21:04:10 -07:00
snipe 537ad28a67 Don’t make required encrypted custom fields required if user is not an admin 2016-08-25 21:03:52 -07:00
snipe 97a938f119 Method helper to translate piped field_values into a useable array 2016-08-25 18:35:01 -07:00
snipe 14fa7ed965 Fixed indenting 2016-08-23 15:51:14 -07:00
snipe b726d131a4 More helpful message for LDAP TLS issue 2016-08-23 11:32:11 -07:00
Daniel Meltzer ac63642224 Add manufacturer to licenses (#2436)
* Add manufacturer to licenses.  Shows in table and edit.  Need to improve manufacturer view to show lists beyond assets still.

* Remove extra closing tags, formatting

* Work on making the manufacturer view show more options. Need to figure out how to change the table dynamically.

* Cleanup formatting and fix a few weirdities in hardware/view.blade.php

* Standardize on two-space tabs in this file, as it seems the most
* common.

* Fix a few places where we call number_format without guaranteeing the
* item is a number and not a string.

* Show a "No Results" message on components page if there are no
* components.

* Show table of licenses on manufacturer view page.

This reworks the ManufacturersController::getDataView method to delegate
the view to a sub method (currently assets or licenses, but plan to
extend to consumables/accessories/components as well).  We then put tabs
at the top of the view to show multiple tables.  This just duplicates
the table layout from licenses/index.blade, but I wonder if theres a way
to centralize that code, maybe through partials, over time..

The only known missing part of manufacturers for licenses would be adding it
to the importer, but the license importer should probably migrate to
object importer before doing too much more...

* Add manufacturer to accessory.

* Add consumables to the manufacturer view page.
2016-08-16 18:49:54 -07:00
snipe 44821b9667 Fixes #2404 Only update name of asset if it isn't null. 2016-08-16 18:23:20 -07:00
Daniel Meltzer 7ef4f23d0f Validate that purchase_cost is a numeric value. (#2452) 2016-08-16 18:18:50 -07:00
Daniel Meltzer a852c624d3 Fix 2347 (#2394)
* Prevent multiple checkouts of the same asset.

This adds a new method to the Asset model, availableForCheckout.
Port getDataTable to use availableForCheckout instead of doing the
check manually.

Fixes Issue #2347

* Use availableForCheckout in categories controller.  Also gate the checkin/checkout actions here.

* Use gate and availableForCheckout in manufactuers as well.
2016-08-16 13:02:42 -07:00
snipe 4a9f3fd6ff Generate email method 2016-08-12 16:02:39 -07:00
snipe 9ae1841fc4 Make additional fields fillable 2016-08-12 16:02:18 -07:00
snipe 1d3255a00b Allow admin to turn LDAP password sync off.
This is added to handle customers/users with a security policy that prohibits third-parties or external databases from storing LDAP passwords.
2016-08-04 14:29:28 -07:00
snipe 0e5209e80f Few more dashboard fixes 2016-08-02 05:06:17 -07:00
Brady Wetherington 1747be4b29 Enable .env file to point to location of CA Cert (#2382) 2016-08-02 02:36:00 -07:00
snipe 39450c1fe9 Eager load throttle query 2016-08-02 01:23:53 -07:00
snipe 139325d8ba Small tweaks for bad data 2016-08-01 10:17:46 -07:00
Daniel Meltzer eef8d1609e Small fixes (#2350)
* components.view should point to view, not create

* Fix comment

* Rename variable to accurately reflect its responsibility

* Fix line breaks in serial key, remove places where adding line breaks makes no sense.  Fixes #2344
2016-07-28 20:59:42 -07:00
snipe 1f0737cfb7 Allow super admins to override company 2016-07-28 12:40:19 -07:00
snipe fbd0059bbb Fixes #2317 2016-07-28 08:07:14 -07:00
snipe eb508901c5 Zerofilling for auto-increment 2016-07-27 21:28:00 -07:00
Daniel Meltzer 399e70763b Scope requestable assets to company as well. Updates to #2206. (#2326) 2016-07-26 16:22:56 -07:00
Daniel Meltzer 9e4ac018ea Don't allow users without a company to change the company of items if full company support is enabled. (#2321) 2016-07-26 13:31:36 -07:00
Daniel Meltzer 0bf5c6978e Make sure the assigned user is actually shown in the dropdown list. Not sure why this wasn't throwing an error for me, but this makes it actually behave. (#2322) 2016-07-26 13:06:38 -07:00
snipe b76dc25ac0 Duh, we don’t soft-delete companies 2016-07-26 02:11:41 -07:00
snipe b30369f7ce Added table name for trait 2016-07-26 02:04:31 -07:00
snipe 16fe53928c Updated undeleted validation 2016-07-26 01:49:21 -07:00
snipe 2e665e128f Putting uniqueUndeleted into a trait for use across models 2016-07-26 01:39:30 -07:00
snipe a44b90dfc9 Custom validator for multiple deleted items with the same unique field 2016-07-26 00:44:26 -07:00
Daniel Meltzer e0938cf82d Scope to company when viewing assets (#2315)
* If a user doesn't belong to a company, when scoping to a company we should only show items that don't belong to a company.

* Scope tables/items to the company they belong to when fetching items for the index.

* Fix asset count to also scope to company.  This fixes dashboard view

* Exempt super users from the child company check to be consistent.  Fixes license count on dashboard now that we scope everything
2016-07-25 19:46:29 -07:00
snipe eec22c5aeb Removed port stuff, since LDAP ignores it anyway :-/ 2016-07-22 16:21:16 -07:00
snipe b03330aae0 Added TLS option in settings for LDAP 2016-07-22 16:00:37 -07:00
snipe ba25972b49 Add LDAP port number option 2016-07-22 15:09:49 -07:00
snipe 61108102d7 No longer require last name
I may regret this…
2016-07-21 19:44:07 -07:00
Daniel Meltzer 68b0bbbec9 Fix tests (#2273)
* Update installer script for v3 now that things have moved around.

* Make Statuslabel attributes fillable and add them to the generated array.  Fixes status label tests.
2016-07-19 15:50:21 -07:00
snipe 192b1582f5 Merge branch 'v3' of git@github.com:snipe/snipe-it.git 2016-07-15 16:46:15 -07:00
snipe 27b8d326e3 fix for undefined user 2016-07-15 16:38:49 -07:00
snipe 698cb161d4 Not sure how this ever worked? 2016-07-15 11:11:48 -07:00
snipe 92175eb700 Few more LDAP/AD tweaks 2016-07-14 23:49:32 -07:00
snipe c1d2be651a Removed default pemissions 2016-07-14 18:32:54 -07:00
snipe 8729871353 Fucking rookie mistake. Send redbull. 2016-07-14 16:52:20 -07:00
snipe 99a42dfc38 More AD fixes 2016-07-14 16:27:32 -07:00
snipe 0cf8ac1d95 Add AD domain to settings 2016-07-14 15:52:52 -07:00
snipe e6b872299d Possible fix for #2246 - needs AD testing 2016-07-13 15:18:29 -07:00
snipe 2ce1d8b985 Fixed missing use statement 2016-07-13 07:13:49 -07:00
snipe b5d3843b7c New LDAP model 2016-07-13 05:48:16 -07:00
snipe 026f099ba3 Fixed indenting 2016-07-13 05:47:32 -07:00
snipe 7a4cbce460 Use trans instead of lang:: 2016-07-10 21:07:59 -07:00
snipe 3f835ba847 Updated lang to trans 2016-07-10 21:04:49 -07:00
snipe 3bb5479efd Move print statement to LOG 2016-07-01 16:24:58 -07:00
snipe 6d5bc64b2b Another fix for status label types
This is a little janky, as it breaks up the errors into multiple screens if you don't have a status label type AND don't have a name. This is because the model-level validation won't work since we transmogrify that dropdown list of status label types into  boolean values for the DB. Should eventually find a less clunky way to handle this, but needed to get a fix in now.
2016-06-28 14:52:11 -07:00
snipe 6633366b29 Small fix for status label types 2016-06-28 12:40:20 -07:00
snipe 483bf1b309 Merge branch 'v3' of github.com:snipe/snipe-it into v3 2016-06-28 12:19:19 -07:00
snipe 0e96a0aa3e Updated comment 2016-06-28 12:19:14 -07:00
snipe e4275bd3d3 Fixes status label inline creation 2016-06-28 12:19:05 -07:00
Daniel Meltzer d484636bba Add model number column to the hardware list. (#2204)
* Add model number column to the hardware list and allow searching based on model number.   Column is hidden by default.

* Fix sorting.  Add scope to order by model number.
2016-06-27 22:32:40 -07:00
Daniel Meltzer 5bc52a9425 Link to user on asset checkout as well as checkin. 2016-06-23 09:39:50 -04:00
snipe 0cf563ae5b Show admin in maintenances 2016-06-22 17:04:47 -07:00
snipe 0ca85f8a8a Updates to components 2016-06-22 14:55:17 -07:00
snipe f753783ca0 Smaller miminums for model and category name 2016-06-22 12:50:21 -07:00
snipe 4ed8ff5576 Formatting fixes for coding standards 2016-06-22 12:27:41 -07:00
Daniel Meltzer 5a45ec708b Use the model validation trait to validate asset maintences. Might be better to add a form request as well, but this at least makes the model validation occur. fixes #2170 2016-06-16 22:22:07 -04:00
snipe 6a277a5391 Added inheritance back into users/groups 2016-06-15 20:45:45 -07:00
snipe c29984d0df Skip superuser check if the user isn't logged in 2016-06-13 19:05:29 -07:00
snipe bfe4bc6ee5 Bypass company scoping if user is an admin 2016-06-13 11:40:22 -07:00
snipe 396446a34b Updated namespace for collection 2016-06-13 10:54:28 -07:00
snipe 2daed3c271 Fix for custom fields not saving 2016-06-10 16:36:46 -07:00
snipe c1a3592059 Fixes #2130 2016-06-10 08:29:43 -07:00
snipe a0901247a3 Let superadmins through companyable trait 2016-06-10 04:07:27 -07:00
snipe ec4bc6c2af Allow superadmins to print labels 2016-06-10 03:40:49 -07:00
snipe 95f94c1cfb Fixed error when user has no permissions values 2016-06-02 17:16:22 -07:00
snipe 97691726f0 Updates to permissions decoding 2016-06-02 02:49:32 -07:00
snipe eacf70ee3f Updated validation 2016-06-01 15:45:05 -07:00
Daniel Meltzer 1c1ef951e9 Fix a regression in Helper::usersList and ::managerList() where the "Select a User" option disappeared. Also format names the way they used to be formatted. 2016-06-01 13:47:46 -05:00
Daniel Meltzer f2a5337ad2 Simplify 2016-05-31 19:41:14 -05:00
Daniel Meltzer 0fa82743a1 Remove remaining DB::Raw(concat) calls to make things more sqlite friendly. This adds one new method to the Asset Model to return the formatted string that was used by the license and asset maintence controller. It also fixes a potential sqlite-only issue where '' and null are different. 2016-05-31 19:41:14 -05:00
Daniel Meltzer 4b98711e07 Replace the assorted concat() methods with a full_name method in the User model and adjust queries accordingly 2016-05-31 19:41:14 -05:00
snipe 0e0b31bba6 Company name length to 1 2016-05-31 15:04:13 -07:00
snipe bfc3f69adb Better comments on model methods 2016-05-24 16:08:18 -07:00
snipe cde0d49e18 Added assets method 2016-05-24 16:06:22 -07:00
snipe abf027059f Fixed comment 2016-05-24 16:06:15 -07:00
snipe c4a699f109 Validation for new alert settings 2016-05-19 19:43:05 -07:00
snipe c1c7fa143d Components display on assets page 2016-05-18 19:26:50 -07:00
snipe fb26188e41 Fixed dashboard for components 2016-05-18 19:16:43 -07:00
snipe 23e416fd88 Make site name required 2016-05-18 18:24:28 -07:00
snipe 0568e979e8 If permissions are blank, don't error out on json_decode 2016-05-18 14:38:17 -07:00
snipe e552c36a0a Add model_no, item_no, and manufacturer to consumables 2016-05-16 17:11:31 -07:00
snipe 415b60a293 Added check for setup in Setting model 2016-05-14 16:09:00 -07:00
snipe 8ca71df7c9 Check for superuser 2016-05-14 15:05:35 -07:00
snipe a726934cde Fixed bulk delete+checkin for users 2016-05-12 21:01:31 -07:00
snipe ae8a03fec3 Add manufacturer name/sorting/searching on assets 2016-05-12 10:38:57 -07:00
snipe d40289fbc9 Fixes #1997 and #1996 - replace sentry functions 2016-04-28 21:59:43 -07:00
snipe a0bff94de3 Moved selectedPermissionsArray 2016-04-28 20:57:07 -07:00
snipe 449163c875 Fixes #1995 - updated group admin to use native permissions 2016-04-28 14:03:54 -07:00
snipe 96911b9e57 Fixes #1944 - add manufacturer to model list 2016-04-23 03:34:49 -07:00
snipe 97e218541b Fixes date sanity check in checkout 2016-04-23 02:36:21 -07:00
snipe 8179fc2f90 Changed checkout method to be more generic, for checkin and checkout 2016-04-23 02:07:40 -07:00
snipe c39e27cc5e Fixes #1955 - searching within locations 2016-04-19 20:23:04 -07:00
snipe 13f85e82bb Fixes #1909 - allow 0 month depreciation 2016-04-19 07:39:54 -07:00
snipe a62859dc6d Updated docblocks 2016-04-07 13:21:09 -07:00
snipe 6f9bad1005 Use lightbox for images in asset file listing 2016-03-25 20:38:27 -07:00
snipe 95e2825716 A few more path fixes 2016-03-25 17:20:28 -07:00
snipe fe00b0e401 Version 3 - hold onto your butts 2016-03-25 01:18:05 -07:00