issue #328 fixed

parent 8005ee19
...@@ -638,22 +638,25 @@ VIEW `v_stu_last_instruction` AS ...@@ -638,22 +638,25 @@ VIEW `v_stu_last_instruction` AS
I.`name` AS `ins_name`, I.`name` AS `ins_name`,
M.`name` AS `met_name`, M.`name` AS `met_name`,
M.`id_stu` AS `id_stu` M.`id_stu` AS `id_stu`
from FROM
`working_session` AS WS join `working_session` AS WS join
`instruction` AS I join `instruction` AS I join
`method` AS M `method` AS M join
where (SELECT M.`id_stu`AS id_stu,
WS.`id_ins` =I.`id` MAX(WS.begin) AS TIME
and I.`id_met` = M.`id` FROM
and WS.`begin` = (SELECT `working_session` AS WS join
MAX(WS.begin) `instruction` AS I join
FROM `method` AS M
`working_session` AS WS join WHERE
`instruction` AS I join WS.`id_ins` =I.`id`
`method` AS M and I.`id_met` = M.`id`
WHERE group by M.`id_stu`) AS LAST_WS
WS.`id_ins` =I.`id` WHERE
and I.`id_met` = M.`id`); LAST_WS.TIME = WS.begin and
LAST_WS.id_stu = M.`id_stu` and
WS.`id_ins` =I.`id`
and I.`id_met` = M.`id`;
-- --
-- VIEW `v_stu_last_instruction` -- VIEW `v_stu_last_instruction`
......
...@@ -44,7 +44,7 @@ module.exports.policies = { ...@@ -44,7 +44,7 @@ module.exports.policies = {
list: ['tokenAuth', 'isAdmin'], list: ['tokenAuth', 'isAdmin'],
destroy: ['tokenAuth', 'isAdmin'], destroy: ['tokenAuth', 'isAdmin'],
students: ['tokenAuth'], students: ['tokenAuth'],
pictos: ['tokenAuth'], pictos: ['tokenAuth', 'isAdmin'],
upload: ['tokenAuth'] upload: ['tokenAuth']
}, },
DeviceController: { DeviceController: {
...@@ -76,11 +76,11 @@ module.exports.policies = { ...@@ -76,11 +76,11 @@ module.exports.policies = {
find: ['tokenAuth'], find: ['tokenAuth'],
findOne: ['tokenAuth'], findOne: ['tokenAuth'],
getInfo: ['tokenAuth'], getInfo: ['tokenAuth'],
create: ['tokenAuth', 'isSupAdmin'], // isSupAdmin too create: ['tokenAuth',], // isSupAdmin too
update: ['tokenAuth'], update: ['tokenAuth'],
delete: ['tokenAuth', 'isSupAdmin'], delete: ['tokenAuth'],
//destroy: ['tokenAuth'], // isSupAdmin too //destroy: ['tokenAuth'], // isSupAdmin too
devices: ['tokenAuth'], // isSupAdmin is supervisor of the devices: ['tokenAuth' ], // isSupAdmin is supervisor of the
supervisors: ['tokenAuth'], supervisors: ['tokenAuth'],
therapists: ['tokenAuth'], therapists: ['tokenAuth'],
tutors: ['tokenAuth'], // isSupervisorOfStudent falla en Student.supervisors tutors: ['tokenAuth'], // isSupervisorOfStudent falla en Student.supervisors
...@@ -93,7 +93,7 @@ module.exports.policies = { ...@@ -93,7 +93,7 @@ module.exports.policies = {
vocabulary: true, // websockets vocabulary: true, // websockets
action: true, // websockets action: true, // websockets
config: true, // websockets config: true, // websockets
pictos: ['tokenAuth', 'isSupervisorOfStudentOrIsStudent'], pictos: ['tokenAuth'],
add_picto: ['tokenAuth', 'isSupervisorOfStudent'], add_picto: ['tokenAuth', 'isSupervisorOfStudent'],
delete_picto: ['tokenAuth', 'isSupervisorOfStudent'], delete_picto: ['tokenAuth', 'isSupervisorOfStudent'],
update_picto: ['tokenAuth', 'isSupervisorOfStudent'], update_picto: ['tokenAuth', 'isSupervisorOfStudent'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment