Compare commits
98 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6a08ee1597 | |||
| 7bd5ddc516 | |||
| ed05a32f0b | |||
| 780226a612 | |||
| ca37c63649 | |||
| c3e4b579d3 | |||
| 217caf3002 | |||
| c870933125 | |||
| 3698b107d6 | |||
| 703fd9ba8f | |||
| 9107784746 | |||
| b1776a2816 | |||
| 9f993fa16c | |||
| 7555b97f80 | |||
| 784238f2de | |||
| 0d76ea5050 | |||
| 3199dfd1d8 | |||
| ceac5a59ff | |||
| 309ce7d0bd | |||
| 129e45c817 | |||
| e8f3b27141 | |||
| 2eb64b3105 | |||
| c48ae56e2f | |||
| 8d5033c4e5 | |||
| fd78fd8d24 | |||
| 1f6874f0af | |||
| fdde048f11 | |||
| 8fd50e9524 | |||
| f836f88e38 | |||
| 775239e2ed | |||
| 16d1875157 | |||
| af6d9b462b | |||
| bfeb4560ca | |||
| 194e43d206 | |||
| 13830b5c09 | |||
| 855a155178 | |||
| 3975555503 | |||
| b1d6d4da37 | |||
| be402a9d7d | |||
| 00aba507f7 | |||
| 0cadab8fc6 | |||
| cc14eee161 | |||
| 9d4f7193ae | |||
| 2f62925d85 | |||
| f40d4dfbf4 | |||
| fd9f6f615f | |||
| c7618bd31e | |||
| 4e831a6396 | |||
| 0492fad3ab | |||
| 1db2a84dcb | |||
| 913e7f7803 | |||
| da10a9a2aa | |||
| cf7ef5e8b0 | |||
| 3f08258bf0 | |||
| f7ce7060eb | |||
| 6e13da6293 | |||
| dd2b9e15a6 | |||
| 49e898fd26 | |||
| 1927f131aa | |||
| d3bcf727fb | |||
| 1d9bf26194 | |||
| 7a813b2a45 | |||
| 9904f664be | |||
| 41c257829e | |||
| cf649fcd12 | |||
| 4ac79f5e12 | |||
| 7b0fd2c8f4 | |||
| a2bd4250cf | |||
| 26ede441a4 | |||
| afac18ea1b | |||
| da187ff07a | |||
| 9849bbec70 | |||
| 3aaed2600e | |||
| 8e316611c0 | |||
| 0a97135578 | |||
| 1bed711f0e | |||
| 1f1c1cb546 | |||
| f2e7af498e | |||
| afdb958955 | |||
| 06966d52bf | |||
| 723a6260f5 | |||
| a98a0a2f77 | |||
| 59e755c5df | |||
| 55b2fce876 | |||
| 1fadabaf2f | |||
| 33178adeed | |||
| 46fb12f5dc | |||
| 12e6a721f0 | |||
| 0cbc9d266e | |||
| 67e0e14a12 | |||
| 85a64f9dfd | |||
| a28481cd8f | |||
| a5b2dbfaf0 | |||
| abb970fe39 | |||
| 9ac093e0be | |||
| 61e16a4668 | |||
| dacbdd9aa5 | |||
| e1eb2da5f3 |
+15
-12
@@ -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
@@ -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
|
||||
|
||||
|
||||
Executable
+45
@@ -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',
|
||||
|
||||
);
|
||||
Executable
+20
@@ -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',
|
||||
|
||||
);
|
||||
Executable
+103
@@ -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,
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
);
|
||||
@@ -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,
|
||||
|
||||
|
||||
);
|
||||
Executable
+124
@@ -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,
|
||||
|
||||
);
|
||||
@@ -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,
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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
@@ -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;
|
||||
|
||||
@@ -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',
|
||||
|
||||
);
|
||||
@@ -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
@@ -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
@@ -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
|
||||
@@ -9,4 +9,4 @@ modules:
|
||||
- Laravel4:
|
||||
filters: true
|
||||
cleanup: true
|
||||
environment: testing
|
||||
environment: testing
|
||||
Reference in New Issue
Block a user