The goal of this GIST is to give a short summary of what is needed to perform authentication from an ember.js application using simple-auth and the SilverStripe RESTful API module
Here's a list of the software that was used:
The goal of this GIST is to give a short summary of what is needed to perform authentication from an ember.js application using simple-auth and the SilverStripe RESTful API module
Here's a list of the software that was used:
| // Data Record Class : DataRecord.php | |
| <?php | |
| class DataRecord extends DataObject | |
| { | |
| private static $db = array( | |
| 'Firstname' => 'Varchar(255)', | |
| 'Lastname' => 'Varchar(255)' | |
| ); | |
| private static $many_many = array( |
| // Data Record Class : DataRecord.php | |
| <?php | |
| class DataRecord extends DataObject | |
| { | |
| private static $db = array( | |
| 'Firstname' => 'Varchar(255)', | |
| 'Lastname' => 'Varchar(255)' | |
| ); | |
| private static $many_many = array( |
| <?php | |
| /** | |
| * Extension that adds permissions for object owners | |
| * | |
| * The desired permissions have to be set as extension parameters. | |
| * Allowed permission values are: | |
| * - view | |
| * - edit | |
| * - delete | |
| * |
Steps to success:
npm install -g gulpnpm install --save-dev gulpnpm install -g browser-syncnpm install --save-dev gulp-sassnpm install --save-dev gulp-sourcemaps| class ControllerExtension extends Extension | |
| { | |
| public function onBeforeInit() | |
| { | |
| // Ensure the locale is set properly on all requests (otherwise AJAX requests might return templates rendered | |
| // with wrong locales). | |
| i18n::set_default_locale(Config::inst()->get('i18n', 'default_locale')); | |
| } | |
| } |
| <?php | |
| /** | |
| * Fix for issue https://github.com/silverstripe/silverstripe-framework/issues/2496 | |
| */ | |
| class FixedConfirmedPasswordField extends ConfirmedPasswordField | |
| { | |
| protected $useMemberValidator = false; | |
| public function getUseMemberValidator() |
| <?php | |
| /** | |
| * A better Member_Validator | |
| * | |
| * Custom validation for the Member object can be achieved through an | |
| * {@link DataExtension} on the BetterMemberValidator object. | |
| */ | |
| class BetterMemberValidator extends RequiredFields | |
| { |
| <?php | |
| /** | |
| * Fix an issue with Omnipay 2.0 and the shop system. | |
| * The shop assumes that all gateways support the "purchase" method, but that isn't the case. | |
| */ | |
| class FixedPurchaseService extends PurchaseService | |
| { | |
| /** |
The shop-ajax module:
composer require markguinn/silverstripe-shop-ajax