Loading module/Oscar/src/Oscar/Controller/AdministrationController.php +6 −2 Original line number Diff line number Diff line Loading @@ -499,6 +499,10 @@ class AdministrationController extends AbstractOscarController $authentificationId = $this->params()->fromPost('authentification_id'); $roleId = $this->params()->fromPost('role_id'); $this->getLogger()->debug("RoleID : $roleId"); $this->getLogger()->debug("AuthentificationID : $authentificationId"); $this->getLogger()->debug(print_r($_POST, true)); try { /** @var Authentification $authentification */ $authentification = $this->getEntityManager()->getRepository(Authentification::class)->find($authentificationId); Loading @@ -509,10 +513,10 @@ class AdministrationController extends AbstractOscarController return $this->getResponseNotFound("Compte introuvable."); } if( !$role ){ return $this->getResponseNotFound("Rôle introuvable."); return $this->getResponseNotFound("Rôle '$roleId' introuvable."); } } catch ( \Exception $e ){ return $this->getResponseInternalError("Rôle/Authentification introuvable."); return $this->getResponseInternalError("Rôle/Authentification introuvable : " . $e->getMessage()); } $method = $this->getHttpXMethod(); Loading module/Oscar/view/oscar/administration/users.phtml +5 −0 Original line number Diff line number Diff line Loading @@ -240,8 +240,10 @@ <script> require(['vue', 'vue-resource', 'mm', 'authentification'], function(Vue, VueResource, moment, Authentification){ Vue.use(VueResource); const regex = /\[\w*:[0-9]*:([^\]]*)\]/g; Vue.filter('logMessage', function (message) { Loading @@ -253,6 +255,9 @@ return "le " + m.format('dddd D MMMM YYYY') + ', ' + m.fromNow(); }); Vue.http.options.emulateHTTP = true; Vue.http.options.emulateJSON = true; new Vue({ render(h) { return h(Authentification.default, { Loading public/js/oscar/dist/Authentification.js +137 −2 File changed.Preview size limit exceeded, changes collapsed. Show changes public/js/oscar/src/Authentification.vue +8 −4 Original line number Diff line number Diff line Loading @@ -154,6 +154,7 @@ </section> </template> <script> // poi watch --format umd --moduleName Authentification --filename.css Authentification.css --filename.js Authentification.js --dist public/js/oscar/dist public/js/oscar/src/Authentification.vue export default { props: { 'users': {required: true}, Loading Loading @@ -235,10 +236,13 @@ this.addRoleError = null; if (this.addRoleUser.id && this.addRoleId) { this.$http.post(this.urlRoles, { authentification_id: this.addRoleUser.id, role_id: this.addRoleId }).then( var form = new FormData(); form.append('authentification_id', this.addRoleUser.id); form.append('role_id', this.addRoleId); this.$http.post(this.urlRoles, form).then( res => { this.addRoleUser.roles = res.data.roles; this.addRoleUser = null; Loading Loading
module/Oscar/src/Oscar/Controller/AdministrationController.php +6 −2 Original line number Diff line number Diff line Loading @@ -499,6 +499,10 @@ class AdministrationController extends AbstractOscarController $authentificationId = $this->params()->fromPost('authentification_id'); $roleId = $this->params()->fromPost('role_id'); $this->getLogger()->debug("RoleID : $roleId"); $this->getLogger()->debug("AuthentificationID : $authentificationId"); $this->getLogger()->debug(print_r($_POST, true)); try { /** @var Authentification $authentification */ $authentification = $this->getEntityManager()->getRepository(Authentification::class)->find($authentificationId); Loading @@ -509,10 +513,10 @@ class AdministrationController extends AbstractOscarController return $this->getResponseNotFound("Compte introuvable."); } if( !$role ){ return $this->getResponseNotFound("Rôle introuvable."); return $this->getResponseNotFound("Rôle '$roleId' introuvable."); } } catch ( \Exception $e ){ return $this->getResponseInternalError("Rôle/Authentification introuvable."); return $this->getResponseInternalError("Rôle/Authentification introuvable : " . $e->getMessage()); } $method = $this->getHttpXMethod(); Loading
module/Oscar/view/oscar/administration/users.phtml +5 −0 Original line number Diff line number Diff line Loading @@ -240,8 +240,10 @@ <script> require(['vue', 'vue-resource', 'mm', 'authentification'], function(Vue, VueResource, moment, Authentification){ Vue.use(VueResource); const regex = /\[\w*:[0-9]*:([^\]]*)\]/g; Vue.filter('logMessage', function (message) { Loading @@ -253,6 +255,9 @@ return "le " + m.format('dddd D MMMM YYYY') + ', ' + m.fromNow(); }); Vue.http.options.emulateHTTP = true; Vue.http.options.emulateJSON = true; new Vue({ render(h) { return h(Authentification.default, { Loading
public/js/oscar/dist/Authentification.js +137 −2 File changed.Preview size limit exceeded, changes collapsed. Show changes
public/js/oscar/src/Authentification.vue +8 −4 Original line number Diff line number Diff line Loading @@ -154,6 +154,7 @@ </section> </template> <script> // poi watch --format umd --moduleName Authentification --filename.css Authentification.css --filename.js Authentification.js --dist public/js/oscar/dist public/js/oscar/src/Authentification.vue export default { props: { 'users': {required: true}, Loading Loading @@ -235,10 +236,13 @@ this.addRoleError = null; if (this.addRoleUser.id && this.addRoleId) { this.$http.post(this.urlRoles, { authentification_id: this.addRoleUser.id, role_id: this.addRoleId }).then( var form = new FormData(); form.append('authentification_id', this.addRoleUser.id); form.append('role_id', this.addRoleId); this.$http.post(this.urlRoles, form).then( res => { this.addRoleUser.roles = res.data.roles; this.addRoleUser = null; Loading