Skip to content
Snippets Groups Projects
Verified Commit cb19ab28 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Fix #878: Added a info message on embed wizard when anonymous access to content is disabled

parent 8ed6f830
No related branches found
No related tags found
No related merge requests found
Added a info message on embed wizard when anonymous access to content is disabled (#878)
<template> <template>
<div> <div>
<div class="ui warning message" v-if="!anonymousCanListen">
<p>
<strong>
<translate translate-context="Content/Embed/Message">Sharing will not work because this pod doesn't allow anonymous users to access content.</translate>
</strong>
</p>
<p>
<translate translate-context="Content/Embed/Message">Please contact your admins and ask them to update the corresponding setting.</translate>
</p>
</div>
<div class="ui form"> <div class="ui form">
<div class="two fields"> <div class="two fields">
<div class="field"> <div class="field">
...@@ -41,6 +51,9 @@ ...@@ -41,6 +51,9 @@
<script> <script>
import { mapState } from "vuex"
import _ from '@/lodash'
export default { export default {
props: ['type', 'id'], props: ['type', 'id'],
data () { data () {
...@@ -57,6 +70,12 @@ export default { ...@@ -57,6 +70,12 @@ export default {
return d return d
}, },
computed: { computed: {
...mapState({
nodeinfo: state => state.instance.nodeinfo,
}),
anonymousCanListen () {
return _.get(this.nodeinfo, 'metadata.library.anonymousCanListen', false)
},
iframeSrc () { iframeSrc () {
let base = process.env.BASE_URL let base = process.env.BASE_URL
if (base.startsWith('/')) { if (base.startsWith('/')) {
...@@ -99,7 +118,7 @@ export default { ...@@ -99,7 +118,7 @@ export default {
<!-- Add "scoped" attribute to limit CSS to this component only --> <!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped> <style scoped>
.message { p.message {
position: absolute; position: absolute;
right: 0; right: 0;
bottom: -2em; bottom: -2em;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment