Compare commits

...

98 Commits

Author SHA1 Message Date
snipe 6a08ee1597 Merge remote-tracking branch 'origin/develop' 2015-09-03 19:24:22 -07:00
snipe 7bd5ddc516 Fixes incorrect title for unaccepted assets report 2015-09-01 16:41:47 -07:00
snipe ed05a32f0b Merge pull request #1061 from vsposato/feature/setupCodeception
DO NOT MERGE - testing codeception
2015-08-31 13:57:37 -07:00
snipe 780226a612 Merge pull request #1127 from madd15/patch-1
Fix #1109 - Asset names are missing when viewing user history
2015-08-31 13:57:12 -07:00
snipe ca37c63649 Merge pull request #1128 from madd15/patch-2
Fix #1123 - fix new lines in serial not being recognised
2015-08-31 13:57:04 -07:00
Vincent Sposato c3e4b579d3 Merge branch 'feature/setupCodeception' of github.com:vsposato/snipe-it into feature/setupCodeception 2015-08-28 20:11:29 -04:00
Vincent Sposato 217caf3002 Cleaning up the tweaks to finalize the testing! 2015-08-28 20:11:02 -04:00
Vincent Sposato c870933125 More tweaks to get environment working 2015-08-28 20:11:02 -04:00
Vincent Sposato 3698b107d6 More tweaks 2015-08-28 20:11:01 -04:00
Vincent Sposato 703fd9ba8f More tweaks 2015-08-28 20:11:01 -04:00
Vincent Sposato 9107784746 More tweaks 2015-08-28 20:11:01 -04:00
Vincent Sposato b1776a2816 Another tweak to the config 2015-08-28 20:11:00 -04:00
Vincent Sposato 9f993fa16c Even more tweaks... 2015-08-28 20:11:00 -04:00
Vincent Sposato 7555b97f80 More tweaks, more prayers... 2015-08-28 20:11:00 -04:00
Vincent Sposato 784238f2de Made changes to travis.yml to see if I can get codeception tests passing 2015-08-28 20:10:59 -04:00
Vincent Sposato 0d76ea5050 Putting app.php back to production state 2015-08-28 20:10:59 -04:00
Vincent Sposato 3199dfd1d8 Checking testing issue to see if wrong environment is loading 2015-08-28 20:10:58 -04:00
Vincent Sposato ceac5a59ff More tweaks to the travis 2015-08-28 20:10:58 -04:00
Vincent Sposato 309ce7d0bd Another tweak - getting close 2015-08-28 20:10:58 -04:00
Vincent Sposato 129e45c817 Updated travis yaml to add a permissions change for the storage directory 2015-08-28 20:10:57 -04:00
Vincent Sposato e8f3b27141 Added a sleep statement to make things work possibly 2015-08-28 20:10:57 -04:00
Vincent Sposato 2eb64b3105 Last change for detecting correct environment 2015-08-28 20:10:57 -04:00
Vincent Sposato c48ae56e2f Last tweak before I head to begin drinking heavily... 2015-08-28 20:10:56 -04:00
Vincent Sposato 8d5033c4e5 A tweak to make this work with an app environment variable 2015-08-28 20:10:56 -04:00
Vincent Sposato fd78fd8d24 This is getting old... 2015-08-28 20:10:56 -04:00
Vincent Sposato 1f6874f0af One last tweak - this may be it 2015-08-28 20:10:55 -04:00
Vincent Sposato fdde048f11 More tweaks / changes 2015-08-28 20:10:55 -04:00
Vincent Sposato 8fd50e9524 Adding more debug tweaks 2015-08-28 20:10:55 -04:00
Vincent Sposato f836f88e38 Another tweak getting closer 2015-08-28 20:10:55 -04:00
Vincent Sposato 775239e2ed Almost there... 2015-08-28 20:10:54 -04:00
Vincent Sposato 16d1875157 A change to my previous tweak for background serving 2015-08-28 20:10:54 -04:00
Vincent Sposato af6d9b462b A couple more tweaks to make everything work 2015-08-28 20:10:53 -04:00
Vincent Sposato bfeb4560ca Got some more tweaks, and changes to make things work 2015-08-28 20:10:53 -04:00
Vincent Sposato 194e43d206 More tweaks for debugging 2015-08-28 20:10:53 -04:00
Vincent Sposato 13830b5c09 More tweaking of the travis yaml file trying to get more out of the results 2015-08-28 20:10:52 -04:00
Vincent Sposato 855a155178 Tweaking the configuration to work with travis - attempting hostname tweaks 2015-08-28 20:10:52 -04:00
Vincent Sposato 3975555503 One more stupid mistake in travis yaml file - 2015-08-28 20:10:52 -04:00
Vincent Sposato b1d6d4da37 Fixed stupid mistake in the travis yaml file 2015-08-28 20:10:51 -04:00
Vincent Sposato be402a9d7d Fixed issue in travis yaml file 2015-08-28 20:10:51 -04:00
Vincent Sposato 00aba507f7 Fixed acceptance suite yaml to make it work for travis-ci as well as local testing 2015-08-28 20:10:50 -04:00
Vincent Sposato 0cadab8fc6 Initial changes to allow travis-ci to run codeception tests 2015-08-28 20:10:50 -04:00
Vincent Sposato cc14eee161 Adding setup for Codeception 2015-08-28 20:10:50 -04:00
Vincent Sposato 9d4f7193ae Cleaning up the tweaks to finalize the testing! 2015-08-28 20:04:42 -04:00
Vincent Sposato 2f62925d85 More tweaks to get environment working 2015-08-28 20:01:29 -04:00
Vincent Sposato f40d4dfbf4 More tweaks 2015-08-28 19:53:47 -04:00
Vincent Sposato fd9f6f615f More tweaks 2015-08-28 19:48:40 -04:00
Vincent Sposato c7618bd31e More tweaks 2015-08-28 19:46:37 -04:00
Vincent Sposato 4e831a6396 Another tweak to the config 2015-08-28 19:44:36 -04:00
Vincent Sposato 0492fad3ab Even more tweaks... 2015-08-28 19:42:45 -04:00
Vincent Sposato 1db2a84dcb More tweaks, more prayers... 2015-08-28 19:41:05 -04:00
Vincent Sposato 913e7f7803 Made changes to travis.yml to see if I can get codeception tests passing 2015-08-28 19:31:50 -04:00
snipe da10a9a2aa Fixes #1130 - don't try to send email if email is not provided with the user 2015-08-28 12:15:07 -07:00
snipe cf7ef5e8b0 Merge pull request #1131 from irasnyd/docker-fixes
Add LDAP support to Docker image
2015-08-28 10:02:18 -07:00
Ira W. Snyder 3f08258bf0 Add LDAP support to Docker image
This adds LDAP support to the Docker image. All parameters are specified
using environment variables named following the convention in the
configuration files themselves.
2015-08-28 09:10:28 -07:00
Ira W. Snyder f7ce7060eb Allow Docker users to set the server URL
This change allows Docker users to set the server URL by setting the
SERVER_URL environment variable. This is done in the same way as the
database and mail settings.
2015-08-28 09:03:06 -07:00
madd15 6e13da6293 Fix #1123 - fix new lines in serial not being recognised
Hope this is the right way to fix this
2015-08-28 16:28:17 +09:30
madd15 dd2b9e15a6 Fix #1109 - Asset names are missing when viewing user history 2015-08-28 14:44:10 +09:30
Brady Wetherington 49e898fd26 Merge pull request #1122 from irasnyd/docker-fixes
Fix broken Docker build
2015-08-26 14:43:10 -07:00
Ira W. Snyder 1927f131aa Fix broken Docker build
The Dockerfile now includes the php5-curl package, which is needed to
satisfy a missing dependency.

The docker/app_start.patch was updated to match changes to the source
code.
2015-08-26 14:09:03 -07:00
snipe d3bcf727fb Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	.gitignore
#	app/commands/LicenseImportCommand.php
#	app/config/version.php
#	app/start/artisan.php
2015-08-25 19:48:16 -07:00
Vincent Sposato 1d9bf26194 Putting app.php back to production state 2015-08-22 13:23:43 -04:00
Vincent Sposato 7a813b2a45 Checking testing issue to see if wrong environment is loading 2015-08-22 13:13:33 -04:00
Vincent Sposato 9904f664be More tweaks to the travis 2015-08-20 18:38:36 -04:00
Vincent Sposato 41c257829e Another tweak - getting close 2015-08-20 18:36:39 -04:00
Vincent Sposato cf649fcd12 Updated travis yaml to add a permissions change for the storage directory 2015-08-20 18:21:47 -04:00
Vincent Sposato 4ac79f5e12 Added a sleep statement to make things work possibly 2015-08-20 17:46:59 -04:00
snipe 7b0fd2c8f4 Squashed commit of the following:
commit 3dbc9becbc7a5cfe94aae968e52e7c7ed902591b
Author: snipe <snipe@snipe.net>
Date:   Wed Aug 19 17:28:25 2015 -0700

    bumped version

commit e66e2f1ba226274f4d4af4e0772b46762b400653
Author: snipe <snipe@snipe.net>
Date:   Wed Aug 19 17:28:17 2015 -0700

    Added notes to license search
2015-08-19 17:29:42 -07:00
snipe a2bd4250cf Ignore LDAP config 2015-08-19 17:26:08 -07:00
Vincent Sposato 26ede441a4 Last change for detecting correct environment 2015-08-15 20:39:31 -04:00
Vincent Sposato afac18ea1b Last tweak before I head to begin drinking heavily... 2015-08-15 20:36:18 -04:00
Vincent Sposato da187ff07a A tweak to make this work with an app environment variable 2015-08-15 20:33:47 -04:00
Vincent Sposato 9849bbec70 This is getting old... 2015-08-15 20:29:18 -04:00
Vincent Sposato 3aaed2600e One last tweak - this may be it 2015-08-15 20:26:42 -04:00
Vincent Sposato 8e316611c0 More tweaks / changes 2015-08-15 20:21:51 -04:00
Vincent Sposato 0a97135578 Adding more debug tweaks 2015-08-15 20:20:46 -04:00
Vincent Sposato 1bed711f0e Another tweak getting closer 2015-08-15 20:15:55 -04:00
Vincent Sposato 1f1c1cb546 Almost there... 2015-08-15 20:08:20 -04:00
Vincent Sposato f2e7af498e A change to my previous tweak for background serving 2015-08-15 20:05:47 -04:00
Vincent Sposato afdb958955 A couple more tweaks to make everything work 2015-08-15 20:03:41 -04:00
Vincent Sposato 06966d52bf Got some more tweaks, and changes to make things work 2015-08-15 20:00:48 -04:00
Vincent Sposato 723a6260f5 More tweaks for debugging 2015-08-15 19:40:30 -04:00
Vincent Sposato a98a0a2f77 More tweaking of the travis yaml file trying to get more out of the results 2015-08-15 19:37:43 -04:00
Vincent Sposato 59e755c5df Tweaking the configuration to work with travis - attempting hostname tweaks 2015-08-15 19:05:01 -04:00
Vincent Sposato 55b2fce876 One more stupid mistake in travis yaml file - 2015-08-15 19:01:03 -04:00
Vincent Sposato 1fadabaf2f Fixed stupid mistake in the travis yaml file 2015-08-15 18:59:22 -04:00
Vincent Sposato 33178adeed Fixed issue in travis yaml file 2015-08-15 18:57:10 -04:00
Vincent Sposato 46fb12f5dc Fixed acceptance suite yaml to make it work for travis-ci as well as local testing 2015-08-15 18:50:46 -04:00
Vincent Sposato 12e6a721f0 Initial changes to allow travis-ci to run codeception tests 2015-08-15 18:48:20 -04:00
Vincent Sposato 0cbc9d266e Adding setup for Codeception 2015-08-15 15:10:17 -04:00
snipe 67e0e14a12 License importer, small fixes for asset imporer 2015-08-14 14:18:51 -07:00
snipe 85a64f9dfd Merge remote-tracking branch 'origin/develop' 2015-08-06 04:00:46 -07:00
snipe a28481cd8f Merge remote-tracking branch 'origin/develop' 2015-07-27 23:10:40 -07:00
snipe a5b2dbfaf0 Merge remote-tracking branch 'origin/develop' 2015-07-23 12:33:26 -07:00
snipe abb970fe39 Merge remote-tracking branch 'origin/develop' 2015-07-17 16:25:55 -07:00
snipe 9ac093e0be Merge remote-tracking branch 'origin/develop' 2015-07-17 14:18:20 -07:00
snipe 61e16a4668 Merge remote-tracking branch 'origin/develop' 2015-07-16 16:25:15 -07:00
snipe dacbdd9aa5 Delete book.json 2015-07-10 19:46:17 -07:00
snipe e1eb2da5f3 Create book.json 2015-07-09 13:32:26 -07:00
18 changed files with 680 additions and 125 deletions
+15 -12
View File
@@ -1,6 +1,6 @@
addons:
hosts:
- snipe-it.dev
- localhost
sudo: false
# see http://about.travis-ci.org/docs/user/languages/php/ for more hints
@@ -14,27 +14,30 @@ php:
# optionally specify a list of environments, for example to test different RDBMS
env:
- DB=mysql
- DB=mysql APP_ENV=travis-ci
# execute any number of scripts before the test run, custom env's are available as variables
before_script:
- hostname
- if [[ "$DB" == "mysql" ]]; then mysql -e "create database IF NOT EXISTS snipeit_unit;" -utravis; fi
- curl -s http://getcomposer.org/installer | php
- cp app/config/testing/app.example.php app/config/testing/app.php
- cp app/config/testing/database.example.php app/config/testing/database.php
- cp app/config/testing/mail.example.php app/config/testing/mail.php
- cp app/config/travis-ci/app.example.php app/config/travis-ci/app.php
- cp app/config/travis-ci/database.example.php app/config/travis-ci/database.php
- cp app/config/travis-ci/mail.example.php app/config/travis-ci/mail.php
- composer self-update
- composer install --prefer-source --no-interaction
- php artisan key:generate --env=testing
- php artisan migrate:install --env=testing --no-interaction -vvv
- php artisan migrate --package cartalyst/sentry --env=testing --no-interaction -vvv
- php artisan migrate --env=testing --no-interaction -vvv
- php artisan db:seed --env=testing --no-interaction -vvv
- php artisan key:generate
- php artisan migrate:install --no-interaction -vvv
- php artisan migrate --package cartalyst/sentry --no-interaction -vvv
- php artisan migrate --no-interaction -vvv
- php artisan db:seed --no-interaction -vvv
- ./vendor/bin/codecept build
- APP_ENV=travis-ci php artisan serve --port=8007 &
- sleep 5
# omitting "script:" will default to phpunit
# use the $DB env variable to determine the phpunit.xml to use
# script: ./vendor/bin/codecept run
script: phpunit
script: ./vendor/bin/codecept run --env travis-ci -vvv
# configure notifications (email, IRC, campfire etc)
notifications:
+4 -23
View File
@@ -4,6 +4,8 @@ MAINTAINER Brady Wetherington <uberbrady@gmail.com>
RUN apt-get update && apt-get install -y \
apache2-bin \
libapache2-mod-php5 \
php5-curl \
php5-ldap \
php5-mysql \
php5-mcrypt \
php5-gd \
@@ -38,29 +40,8 @@ WORKDIR /var/www/html
#Patch bootstrap file
RUN patch -p1 < /tmp/app_start.patch
#DB create?
# mysqladmin -u root create snipeit_laravel
#DB create user, grant access to new DB?
# grant all privileges on snipeit_laravel.* TO snipeit;
#DB config file init? (NEVER overwrite!)
#RUN cp -n /var/www/html/app/config/production/database.example.php /var/www/html/app/config/production/database.php
COPY docker/database.php /var/www/html/app/config/production/database.php
COPY docker/mail.php /var/www/html/app/config/production/mail.php
#change DB file user
#RUN sed -i s/travis/snipe_it/ /var/www/html/app/config/production/database.php
#init app config file (DO NOT overwrite!)
RUN cp -n /var/www/html/app/config/production/app.example.php /var/www/html/app/config/production/app.php
# Change default hostname to blank...I guess?
RUN sed -i s%http://staging.yourserver.com%% /var/www/html/app/config/production/app.php
# turn off the toolbar
RUN sed -i 's%\x27debug\x27 => true%\x27debug\x27 => false%' /var/www/html/app/config/production/app.php
#copy all configuration files
COPY docker/*.php /var/www/html/app/config/production/
RUN chown -R docker /var/www/html
+45
View File
@@ -0,0 +1,45 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/
'debug' => true,
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| your application so that it is used when running Artisan tasks.
|
*/
'url' => 'http://localhost:8007',
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is used by the Illuminate encrypter service and should be set
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
| Run a php artisan key:generate --env=staging to create a random one
*/
'key' => '8YHfiO4EyWBewqrpGHDA4Iuom2ZIahXQ',
);
+20
View File
@@ -0,0 +1,20 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Default Cache Driver
|--------------------------------------------------------------------------
|
| This option controls the default cache "driver" that will be used when
| using the Caching library. Of course, you may use other drivers any
| time you wish. This is the default when another is not specified.
|
| Supported: "file", "database", "apc", "memcached", "redis", "array"
|
*/
'driver' => 'array',
);
+103
View File
@@ -0,0 +1,103 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| PDO Fetch Style
|--------------------------------------------------------------------------
|
| By default, database results will be returned as instances of the PHP
| stdClass object; however, you may desire to retrieve records in an
| array format for simplicity. Here you can tweak the fetch style.
|
*/
'fetch' => PDO::FETCH_CLASS,
/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish
| to use as your default connection for all database work. Of course
| you may use many connections at once using the Database library.
|
*/
'default' => 'mysql',
/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Here are each of the database connections setup for your application.
| Of course, examples of configuring each database platform that is
| supported by Laravel is shown below to make development simple.
|
|
| All database work in Laravel is done through the PHP PDO facilities
| so make sure you have the driver for your particular database of
| choice installed on your machine before you begin development.
|
*/
'connections' => array(
'sqlite' => array(
'driver' => 'sqlite',
'database' => ':memory:',
'prefix' => ''
),
'mysql' => array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'snipeit_unit',
'username' => 'travis',
'password' => '',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
),
),
/*
|--------------------------------------------------------------------------
| Migration Repository Table
|--------------------------------------------------------------------------
|
| This table keeps track of all the migrations that have already run for
| your application. Using this information, we can determine which of
| the migrations on disk have not actually be run in the databases.
|
*/
'migrations' => 'migrations',
/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer set of commands than a typical key-value systems
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
*/
'redis' => array(
'cluster' => true,
'default' => array(
'host' => '127.0.0.1',
'port' => 6379,
'database' => 0,
),
),
);
+112
View File
@@ -0,0 +1,112 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| URL
|--------------------------------------------------------------------------
|
| URL for the LDAP server. This should start with ldap://, for example:
| ldap://ldap.yourserver.com
|
*/
'url' => "",
/*
|--------------------------------------------------------------------------
| Username
|--------------------------------------------------------------------------
|
| Username to use to connect authenticate to LDAP, for example:
| cn=read-only-admin,dc=example,dc=com
|
*/
'username' => "",
/*
|--------------------------------------------------------------------------
| Password
|--------------------------------------------------------------------------
|
| Password to use when authenticating to LDAP.
|
*/
'password' => "",
/*
|--------------------------------------------------------------------------
| Basedn
|--------------------------------------------------------------------------
|
| The base where the search for users will be executed, for example:
| dc=example,dc=com
|
*/
'basedn' => "",
/*
|--------------------------------------------------------------------------
| Filter
|--------------------------------------------------------------------------
|
| The search filter for the LDAP query. This probably does not have to be
| changed.
|
*/
'filter' => "&(cn=*)",
/*
|--------------------------------------------------------------------------
| LDAP field names that will be retrieved to create a user.
|
| Using the username as an example:
| If I set 'result.username' => 'my-org-username', the code will connect to
| LDAP as follows (where $results[$i] represents a row in the LDAP query:
| $username-to-insert-in-snipe-it = $results[$i]["my-org-username"][0]
|
| Note: all these fields are required.
|--------------------------------------------------------------------------
|
| The search filter for the LDAP query.
|
*/
'result.username' => "",
'result.last.name' => "",
'result.first.name' => "",
/*
| These fields are optional as not all LDAP directories will have it. If yours
| does not have them, just leave these blank and the extra check will
| be omitted.
*/
'result.active.flag' => "",
'result.emp.num' => "",
'result.email' => "",
/*
|--------------------------------------------------------------------------
| LDAP filter query for authentication
|--------------------------------------------------------------------------
|
| The LDAP query that we want to execute when authenticating a user. This
| should not have to be changed.
|
*/
'authentication.filter.query' => "uid=",
/*
|--------------------------------------------------------------------------
| LDAP Version
|--------------------------------------------------------------------------
|
| Version of LDAP you are using.
|
*/
'version' => 3,
);
+124
View File
@@ -0,0 +1,124 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Mail Driver
|--------------------------------------------------------------------------
|
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
| sending of e-mail. You may specify which one you're using throughout
| your application here. By default, Laravel is setup for SMTP mail.
|
| Supported: "smtp", "mail", "sendmail"
|
*/
'driver' => 'smtp',
/*
|--------------------------------------------------------------------------
| SMTP Host Address
|--------------------------------------------------------------------------
|
| Here you may provide the host address of the SMTP server used by your
| applications. A default option is provided that is compatible with
| the Postmark mail service, which will provide reliable delivery.
|
*/
'host' => 'smtp.mandrillapp.com',
/*
|--------------------------------------------------------------------------
| SMTP Host Port
|--------------------------------------------------------------------------
|
| This is the SMTP port used by your application to delivery e-mails to
| users of your application. Like the host we have set this value to
| stay compatible with the Postmark e-mail application by default.
|
*/
'port' => 587,
/*
|--------------------------------------------------------------------------
| Global "From" Address
|--------------------------------------------------------------------------
|
| You may wish for all e-mails sent by your application to be sent from
| the same address. Here, you may specify a name and address that is
| used globally for all e-mails that are sent by your application.
|
*/
'from' => array('address' => null, 'name' => null),
/*
|--------------------------------------------------------------------------
| E-Mail Encryption Protocol
|--------------------------------------------------------------------------
|
| Here you may specify the encryption protocol that should be used when
| the application send e-mail messages. A sensible default using the
| transport layer security protocol should provide great security.
|
*/
'encryption' => 'tls',
/*
|--------------------------------------------------------------------------
| SMTP Server Username
|--------------------------------------------------------------------------
|
| If your SMTP server requires a username for authentication, you should
| set it here. This will get used to authenticate with your server on
| connection. You may also set the "password" value below this one.
|
*/
'username' => null,
/*
|--------------------------------------------------------------------------
| SMTP Server Password
|--------------------------------------------------------------------------
|
| Here you may set the password required by your SMTP server to send out
| messages from your application. This will be given to the server on
| connection so that the application will be able to send messages.
|
*/
'password' => null,
/*
|--------------------------------------------------------------------------
| Sendmail System Path
|--------------------------------------------------------------------------
|
| When using the "sendmail" driver to send e-mails, we will need to know
| the path to where Sendmail lives on this server. A default path has
| been provided here, which will work well on most of your systems.
|
*/
'sendmail' => '/usr/sbin/sendmail -bs',
/*
|--------------------------------------------------------------------------
| Mail "Pretend"
|--------------------------------------------------------------------------
|
| When this option is enabled, e-mail will not actually be sent over the
| web and will instead be written to your application's logs files so
| you may inspect the message. This is great for local development.
|
*/
'pretend' => true,
);
+11 -6
View File
@@ -207,7 +207,9 @@ class AuthController extends BaseController
try {
// Get the user password recovery code
$user = Sentry::getUserProvider()->findByLogin(Input::get('username'));
if (!$user = Sentry::getUserProvider()->findByLogin(Input::get('username'))) {
$user = User::where('email','=',Input::get('username'));
}
$reset = $user->getResetPasswordCode();
@@ -221,11 +223,14 @@ class AuthController extends BaseController
$user->save();
// Send the activation code through username
Mail::send('emails.forgot-password', $data, function ($m) use ($user) {
$m->to($user->username, $user->first_name . ' ' . $user->last_name);
$m->subject('Account Password Recovery');
});
if ($user->email) {
// Send the activation code through username
Mail::send('emails.forgot-password', $data, function ($m) use ($user) {
$m->to($user->email, $user->first_name . ' ' . $user->last_name);
$m->subject('Account Password Recovery');
});
}
} catch (Cartalyst\Sentry\Users\UserNotFoundException $e) {
// Even though the username was not found, we will pretend
// we have sent the password reset code through username,
+1 -1
View File
@@ -33,7 +33,7 @@
@if ($license->serial)
<div class="col-md-12 col-sm-12" style="padding-bottom: 10px; margin-left: 15px; word-wrap: break-word;">
<strong>@lang('admin/licenses/form.serial'): </strong>
{{{ $license->serial }}}
{{ nl2br($license->serial) }}
</div>
@endif
@@ -16,7 +16,7 @@
<a href="{{ route('reports/export/unaccepted_assets') }}" class="btn btn-flat gray pull-right"><i class="fa fa-download icon-white"></i>
@lang('admin/asset_maintenances/table.dl_csv')</a>
</div>
<h3>@lang('general.asset_maintenance_report')</h3>
<h3>@lang('general.unaccepted_asset_report')</h3>
</div>
<div class="row">
<div class="table-responsive">
-4
View File
@@ -344,8 +344,6 @@
<td>{{{ $log->action_type }}}</td>
<td>
@if ($log->assetlog)
@if (($log->assetlog) && ($log->asset_type=="hardware"))
@if ($log->assetlog->deleted_at=='')
@@ -385,8 +383,6 @@
@lang('general.bad_data')
@endif
@endif
</td>
<td>{{{ $log->adminlog->fullName() }}}</td>
</tr>
@@ -23,7 +23,7 @@ Forgot Password ::
</label>
<div class="col-md-5">
<input class="form-control" type="text" name="username" id="username" value="{{{ Input::old('username') }}}" />
{{ $errors->first('email', '<br><span class="alert-msg">:message</span>') }}
{{ $errors->first('username', '<br><span class="alert-msg">:message</span>') }}
</div>
</div>
+61 -61
View File
@@ -1,72 +1,72 @@
<?php
/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| The first thing we will do is create a new Laravel application instance
| which serves as the "glue" for all the components of Laravel, and is
| the IoC container for the system binding all of the various parts.
|
*/
/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| The first thing we will do is create a new Laravel application instance
| which serves as the "glue" for all the components of Laravel, and is
| the IoC container for the system binding all of the various parts.
|
*/
$app = new Illuminate\Foundation\Application;
$app = new Illuminate\Foundation\Application;
/*
|--------------------------------------------------------------------------
| Detect The Application Environment
|--------------------------------------------------------------------------
|
| Laravel takes a dead simple approach to your application environments
| so you can just specify a machine name or HTTP host that matches a
| given environment, then we will automatically detect it for you.
|
*/
/*
|--------------------------------------------------------------------------
| Detect The Application Environment
|--------------------------------------------------------------------------
|
| Laravel takes a dead simple approach to your application environments
| so you can just specify a machine name or HTTP host that matches a
| given environment, then we will automatically detect it for you.
|
*/
$env = $app->detectEnvironment( [
'local' => [ 'homestead', 'AlisonMBP' ],
'travis-ci' => getenv('APP_ENV') == 'travis-ci',
'staging' => [ 'stagingweb01' ],
'production' => [ 'www.yourserver.com' ]
] );
$env = $app->detectEnvironment(array(
'local' => array('homestead','AlisonMBP'),
'staging' => array('stagingweb01'),
'production' => array('www.yourserver.com')
));
/*
|--------------------------------------------------------------------------
| Bind Paths
|--------------------------------------------------------------------------
|
| Here we are binding the paths configured in paths.php to the app. You
| should not be changing these here. If you need to change these you
| may do so within the paths.php file and they will be bound here.
|
*/
/*
|--------------------------------------------------------------------------
| Bind Paths
|--------------------------------------------------------------------------
|
| Here we are binding the paths configured in paths.php to the app. You
| should not be changing these here. If you need to change these you
| may do so within the paths.php file and they will be bound here.
|
*/
$app->bindInstallPaths( require __DIR__ . '/paths.php' );
$app->bindInstallPaths(require __DIR__.'/paths.php');
/*
|--------------------------------------------------------------------------
| Load The Application
|--------------------------------------------------------------------------
|
| Here we will load the Illuminate application. We'll keep this is in a
| separate location so we can isolate the creation of an application
| from the actual running of the application with a given request.
|
*/
/*
|--------------------------------------------------------------------------
| Load The Application
|--------------------------------------------------------------------------
|
| Here we will load the Illuminate application. We'll keep this is in a
| separate location so we can isolate the creation of an application
| from the actual running of the application with a given request.
|
*/
$framework = $app[ 'path.base' ] . '/vendor/laravel/framework/src';
$framework = $app['path.base'].'/vendor/laravel/framework/src';
require $framework . '/Illuminate/Foundation/start.php';
require $framework.'/Illuminate/Foundation/start.php';
/*
|--------------------------------------------------------------------------
| Return The Application
|--------------------------------------------------------------------------
|
| This script returns the application instance. The instance is given to
| the calling script so we can separate the building of the instances
| from the actual running of the application and sending responses.
|
*/
/*
|--------------------------------------------------------------------------
| Return The Application
|--------------------------------------------------------------------------
|
| This script returns the application instance. The instance is given to
| the calling script so we can separate the building of the instances
| from the actual running of the application and sending responses.
|
*/
return $app;
return $app;
+45
View File
@@ -0,0 +1,45 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/
'debug' => false,
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| your application so that it is used when running Artisan tasks.
|
*/
'url' => isset($_ENV['SERVER_URL']) ? $_ENV['SERVER_URL'] : 'https://production.yourserver.com',
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is used by the Illuminate encrypter service and should be set
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
| Run a php artisan key:generate --env=staging to create a random one
*/
'key' => 'Change_this_key_or_snipe_will_get_ya',
);
+4 -5
View File
@@ -1,15 +1,14 @@
diff --git a/bootstrap/start.php b/bootstrap/start.php
index 300ba10..92b6bcd 100755
index b7862c418dc3..10368dad43bb 100755
--- a/bootstrap/start.php
+++ b/bootstrap/start.php
@@ -24,12 +24,9 @@ $app = new Illuminate\Foundation\Application;
@@ -24,11 +24,9 @@ $app = new Illuminate\Foundation\Application;
|
*/
-$env = $app->detectEnvironment(array(
-
- 'local' => array('YourLocalDevHostname','AlisonMBP'),
- 'staging' => array('staging.yourserver.com'),
- 'local' => array('homestead','AlisonMBP'),
- 'staging' => array('stagingweb01'),
- 'production' => array('www.yourserver.com')
-));
+$env = $app->detectEnvironment(function () {
+112
View File
@@ -0,0 +1,112 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| URL
|--------------------------------------------------------------------------
|
| URL for the LDAP server. This should start with ldap://, for example:
| ldap://ldap.yourserver.com
|
*/
'url' => isset($_ENV['LDAP_URL']) ? $_ENV['LDAP_URL'] : "",
/*
|--------------------------------------------------------------------------
| Username
|--------------------------------------------------------------------------
|
| Username to use to connect authenticate to LDAP, for example:
| cn=read-only-admin,dc=example,dc=com
|
*/
'username' => isset($_ENV['LDAP_USERNAME']) ? $_ENV['LDAP_USERNAME'] : "",
/*
|--------------------------------------------------------------------------
| Password
|--------------------------------------------------------------------------
|
| Password to use when authenticating to LDAP.
|
*/
'password' => isset($_ENV['LDAP_PASSWORD']) ? $_ENV['LDAP_PASSWORD'] : "",
/*
|--------------------------------------------------------------------------
| Basedn
|--------------------------------------------------------------------------
|
| The base where the search for users will be executed, for example:
| dc=example,dc=com
|
*/
'basedn' => isset($_ENV['LDAP_BASEDN']) ? $_ENV['LDAP_BASEDN'] : "",
/*
|--------------------------------------------------------------------------
| Filter
|--------------------------------------------------------------------------
|
| The search filter for the LDAP query. This probably does not have to be
| changed.
|
*/
'filter' => isset($_ENV['LDAP_FILTER']) ? $_ENV['LDAP_FILTER'] : "&(cn=*)",
/*
|--------------------------------------------------------------------------
| LDAP field names that will be retrieved to create a user.
|
| Using the username as an example:
| If I set 'result.username' => 'my-org-username', the code will connect to
| LDAP as follows (where $results[$i] represents a row in the LDAP query:
| $username-to-insert-in-snipe-it = $results[$i]["my-org-username"][0]
|
| Note: all these fields are required.
|--------------------------------------------------------------------------
|
| The search filter for the LDAP query.
|
*/
'result.username' => isset($_ENV['LDAP_RESULT_USERNAME']) ? $_ENV['LDAP_RESULT_USERNAME'] : "",
'result.last.name' => isset($_ENV['LDAP_RESULT_LAST_NAME']) ? $_ENV['LDAP_RESULT_LAST_NAME'] : "",
'result.first.name' => isset($_ENV['LDAP_RESULT_FIRST_NAME']) ? $_ENV['LDAP_RESULT_FIRST_NAME'] : "",
/*
| These fields are optional as not all LDAP directories will have it. If yours
| does not have them, just leave these blank and the extra check will
| be omitted.
*/
'result.active.flag' => isset($_ENV['LDAP_RESULT_ACTIVE_FLAG']) ? $_ENV['LDAP_RESULT_ACTIVE_FLAG'] : "",
'result.emp.num' => isset($_ENV['LDAP_RESULT_EMP_NUM']) ? $_ENV['LDAP_RESULT_EMP_NUM'] : "",
'result.email' => isset($_ENV['LDAP_RESULT_EMAIL']) ? $_ENV['LDAP_RESULT_EMAIL'] : "",
/*
|--------------------------------------------------------------------------
| LDAP filter query for authentication
|--------------------------------------------------------------------------
|
| The LDAP query that we want to execute when authenticating a user. This
| should not have to be changed.
|
*/
'authentication.filter.query' => isset($_ENV['LDAP_AUTHENTICATION_FILTER_QUERY']) ? $_ENV['LDAP_AUTHENTICATION_FILTER_QUERY'] : "uid=",
/*
|--------------------------------------------------------------------------
| LDAP Version
|--------------------------------------------------------------------------
|
| Version of LDAP you are using.
|
*/
'version' => 3,
);
+20 -10
View File
@@ -6,13 +6,23 @@
class_name: AcceptanceTester
modules:
enabled:
- PhpBrowser:
url: http://snipe-it.dev
# Even when filters are set to true, this doesn't seem to work.
# Also, it looks like the Laravel4 module isn't really meant for
# Acceptance tests?
# - Laravel4:
# filters: true
# cleanup: true
# environment: testing
enabled:
- \Helper\Acceptance
- Laravel4
- PhpBrowser
config:
PhpBrowser:
url: http://snipe-it.dev
Laravel4:
environment: testing
filters: true
env:
travis-ci:
modules:
config:
PhpBrowser:
url: http://localhost:8007
Laravel4:
environment: travis-ci
filters: true
+1 -1
View File
@@ -9,4 +9,4 @@ modules:
- Laravel4:
filters: true
cleanup: true
environment: testing
environment: testing