Gitlab CSE Unil
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
M. Chardon
ADIM
Commits
e59902cb
Commit
e59902cb
authored
Apr 21, 2015
by
Julien Furrer
Browse files
Added SLO configuration for enabling
parent
29417542
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
adim_app/static/_src/adim/config.js
View file @
e59902cb
...
...
@@ -58,11 +58,14 @@ function($){
rateLimitWait
:
300
},
//// Uncomment to enable Shibboleth SLO
//aai : {
// sp_logout: "https://jabba.unil.ch/Shibboleth.sso/Logout",
// idp_logout: "https://aai.unil.ch/idp/logout.jsp"
//},
//// AAI Single Logout
aai
:
{
slo
:
false
,
urls
:
{
sp_logout
:
"
https://jabba.unil.ch/Shibboleth.sso/Logout
"
,
idp_logout
:
"
https://aai.unil.ch/idp/logout.jsp
"
}
},
// ====================================================================
...
...
adim_app/static/_src/adim/ui.js
View file @
e59902cb
...
...
@@ -228,12 +228,12 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export
});
// AAI SLO
if
(
config
.
aai
&&
config
.
user
&&
config
.
user
.
shibboleth
)
{
if
(
config
.
aai
&&
config
.
aai
.
slo
&&
config
.
user
&&
config
.
user
.
shibboleth
)
{
$
(
"
#adim-logout-but
"
).
click
(
function
(
event
)
{
event
.
preventDefault
();
var
logout_url
=
$
(
this
).
attr
(
"
href
"
);
$
(
"
<iframe>
"
,
{
src
:
config
.
aai
.
sp_logout
}).
appendTo
(
"
body
"
).
hide
();
$
(
"
<iframe>
"
,
{
src
:
config
.
aai
.
idp_logout
}).
appendTo
(
"
body
"
).
hide
();
$
(
"
<iframe>
"
,
{
src
:
config
.
aai
.
urls
.
sp_logout
}).
appendTo
(
"
body
"
).
hide
();
$
(
"
<iframe>
"
,
{
src
:
config
.
aai
.
urls
.
idp_logout
}).
appendTo
(
"
body
"
).
hide
();
setTimeout
(
function
()
{
window
.
document
.
location
.
href
=
logout_url
;
},
500
);
...
...
adim_app/static/js/newao_app.min.js
View file @
e59902cb
This diff is collapsed.
Click to expand it.
adim_app/static/js/su_app.min.js
View file @
e59902cb
This diff is collapsed.
Click to expand it.
adim_app/templates/adim_app/annotation.html
View file @
e59902cb
...
...
@@ -80,6 +80,8 @@ window.ADIM_CONFIG = {
show_users_results
:
{{
display_shared_annotations
|
yesno
:
"
true,false
"
}}
},
aai
:
{
slo
:
{{
AAI_CFG
.
SLO
|
yesno
:
"
true,false
"
}}
},
thumbnailSize
:
parseInt
(
"
{{ THUMB_SIZE.0 }}
"
,
10
),
uploadMaxFileSize
:
parseInt
(
'
{{ UPLOAD_MAX_FILESIZE }}
'
,
10
)
*
Math
.
pow
(
2
,
20
)
};
...
...
adim_app/templates/adim_app/annotation_new.html
View file @
e59902cb
...
...
@@ -40,6 +40,8 @@ window.ADIM_CONFIG = {
initial_tool
:
'
select
'
},
aai
:
{
slo
:
{{
AAI_CFG
.
SLO
|
yesno
:
"
true,false
"
}}
},
uploadMaxFileSize
:
parseInt
(
"
{{ UPLOAD_MAX_FILESIZE }}
"
)
*
Math
.
pow
(
2
,
20
)
};
</script>
...
...
adim_project/context_processors.py
View file @
e59902cb
...
...
@@ -11,7 +11,8 @@ def default(request):
'UPLOAD_MAX_FILESIZE'
:
settings
.
ADIM_UPLOAD_MAX_FILESIZE
,
'THUMB_SIZE'
:
settings
.
ADIM_THUMB_SIZE
,
'JS_MIN'
:
''
if
settings
.
ADIM_DEBUG_JS
and
not
settings
.
ADIM_PROD
else
'.min'
,
'PROD'
:
settings
.
ADIM_PROD
'PROD'
:
settings
.
ADIM_PROD
,
'AAI_CFG'
:
getattr
(
settings
,
'AAI'
,
{
'SLO'
:
False
})
})
# try:
...
...
Write
Preview
Supports
Markdown
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