Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e35c7abc
authored
Feb 03, 2016
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
issue
#328
fixed
parent
8005ee19
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
21 deletions
sails/conf/pictodb.sql
sails/src/config/policies.js
sails/conf/pictodb.sql
View file @
e35c7abc
...
@@ -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`
...
...
sails/src/config/policies.js
View file @
e35c7abc
...
@@ -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'
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment