Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright (C) 2000 - 2026 Silverpeas

Expand Down Expand Up @@ -56,13 +56,48 @@
d.setTime(sharing.expiration);
$("#breadcrumb .validityInfo .expiration").html(d.toLocaleString());
}

// get publication and display it
displayPublication();
if (sharing.securityCode) {
$("#securityDialog").dialog({
modal: true, // bloque le reste de la page
title: "Code de sécurité",
width: 400,
buttons: {
"OK": function() {
const input = document.getElementById("securityCode");
const code = input.value;
uri = baseURL + "/silverpeas/services/sharing/" + token + "/check";
fetch(uri, {
method: 'GET',
headers: {
'X-Verification-Code': code
}
})
.then(response => response.json())
.then(result => {
if (result) {
$(this).dialog("close");
// get publication and display it
displayPublication();
} else {
input.value = "";
}
});
},
"Annuler": function() {
$(this).dialog("close");
}
}
});
} else {
// get publication and display it
displayPublication();
}
}, 'json');

function displayPublication() {
var url = baseURL + "/silverpeas/services/sharing/publications/" + token;
$("#breadcrumb").show();
$("#publication").show();
$.getJSON(url, function(publication) {
try {
$(".publiName").html(publication.name);
Expand Down Expand Up @@ -109,7 +144,7 @@
a.appendTo(li);
if (attachment.description) {
var p = $("<p>").addClass("description").html(
attachment.description.replace("\n", "<br/>"));
attachment.description.replace("\n", "<br/>"));
p.appendTo(li);
}

Expand Down Expand Up @@ -157,7 +192,7 @@
// generate zip file
var instanceId = $("#instanceId").val();
var url = baseURL + "/silverpeas/services/sharing/attachments/" + instanceId + "/" + token +
"/" + ids + "/zip";
"/" + ids + "/zip";
$.getJSON(url, function(zip) {
// display modal dialog to download zip
$("#downloadZip-dialog a").attr("href", zip.url);
Expand Down Expand Up @@ -202,10 +237,18 @@
</script>
</head>
<body>

<div id="securityDialog" style="display:none;">
<div id="securityCheck">
<span>Code de sécurité</span>
<input type="text" id="securityCode" name="securityCode"/>
</div>
</div>

<div id="header">
<h1>Gestion documentaire électronique partagée</h1>
</div>
<div id="breadcrumb">
<div id="breadcrumb" style="display: none">
<span class="sharingBy">
<span id="sharingDateLabel"></span>
<span id="sharingDate"></span>
Expand All @@ -216,9 +259,9 @@ <h1>Gestion documentaire électronique partagée</h1>
<span id="expirationLabel"></span> : <span class="expiration"></span>
</span>
<a title="" href="http://www.silverpeas.com" class="silverpeasLink"><img
src="generic-elts/sharedWithSilverpeas.png" alt="silverpeas"/></a>
src="generic-elts/sharedWithSilverpeas.png" alt="silverpeas"/></a>
</div>
<div id="publication">
<div id="publication" style="display: none">
<div class="container">
<div class="attachments bgDegradeGris">
<div class="bgDegradeGris header"><h4 class="clean"></h4></div>
Expand All @@ -236,7 +279,7 @@ <h2 class="publiName"></h2>
<div id="downloadZip-dialog" title="T&eacute;l&eacute;charger vos fichiers" style="display:none">
<p>
<a href="" target="_blank">Cliquez sur le lien pour t&eacute;l&eacute;charger le ZIP</a> - <span
id="zipSize"></span>
id="zipSize"></span>
</p>
</div>
<input type="hidden" id="uri"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE sb_filesharing_ticket
ADD COLUMN securitycode VARCHAR(50);
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE sb_filesharing_ticket
ADD COLUMN securitycode VARCHAR(50);
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE sb_filesharing_ticket
ADD COLUMN securitycode VARCHAR2(50);
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE sb_filesharing_ticket
ADD COLUMN securitycode VARCHAR(50);
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://silverpeas.org/xml/ns/migration https://www.silverpeas.org/xsd/migration.xsd">

<current version="004">
<current version="005">
<script name="create_table.sql" type="sql"/>
<script name="create_constraint.sql" type="sql"/>
</current>

<upgrade fromVersion="004">
<script name="alter_table.sql" type="sql"/>
</upgrade>

</migration>
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ sharing.downloadDate = t\u00e9l\u00e9charg\u00e9 le
sharing.IP = IP
sharing.url = Lien d'acc\u00e8s :
sharing.expiredTicket = Le partage demand\u00e9 a expir\u00e9
sharing.invalideSecurityCode = Code de s\u00e9curit\u00e9 invalide
sharing.sizeFile = Taille
sharing.downloadLink = Lien vers le fichier \u00e0 t\u00e9l\u00e9charger
sharing.maxValue = doit \u00eatre compris entre
Expand All @@ -56,4 +57,9 @@ sharing.accessControl = Contr\u00f4le d'acc\u00e8s
sharing.access.unlimited = Illimit\u00e9
sharing.notification.notifFileLinkLabel = Voir ce fichier
sharing.notification.notifFolderLinkLabel = Voir ce dossier
sharing.notification.notifPublicationLinkLabel = Voir cette publication
sharing.notification.notifPublicationLinkLabel = Voir cette publication
sharing.generation.code=G\u00e9n\u00e9rer un code
sharing.generation.code.help=Si renseign\u00e9, il vous incombera de transmettre ce code
sharing.copy.code=Copier le code s\u00e9curit\u00e9
sharing.security.code=Code s\u00e9curit\u00e9
sharing.confirmCopyInClipbloard=Copi\u00e9 dans le presse papier
Original file line number Diff line number Diff line change
@@ -1 +1,66 @@
## Copyright (C) 2000 - 2026 Silverpeas## This program is free software: you can redistribute it and/or modify# it under the terms of the GNU Affero General Public License as# published by the Free Software Foundation, either version 3 of the# License, or (at your option) any later version.## As a special exception to the terms and conditions of version 3.0 of# the GPL, you may redistribute this Program in connection with Free/Libre# Open Source Software ("FLOSS") applications as described in Silverpeas's# FLOSS exception. You should have received a copy of the text describing# the FLOSS exception, and it is also available here:# "http://www.silverpeas.org/docs/core/legal/floss_exception.html"## This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the# GNU Affero General Public License for more details.## You should have received a copy of the GNU Affero General Public License# along with this program. If not, see <https://www.gnu.org/licenses/>.#sharing.tickets = Meine Freigebensharing.ticket = Freigebensharing.operation = Handlungensharing.updateTicket = Aktualisierung eine Freigebensharing.createTicket = Erstellung eine Freigebensharing.deleteTicket = L\u00f6schung eine Freigebensharing.creationDate = Erstellt amsharing.by = vonsharing.updateDate = Aktualisiert amsharing.endDate = G\u00FCltig bissharing.nbAccessMax = maximale Anzahl von Zugriffensharing.nbAccessMax.info = 0 = unbeschr\u00E4nkt zug\u00E4nglichsharing.nbAccess = Anzahl von Zugriffensharing.token = Schl\u00FCsselsharing.confirmTicket = Ihre Freigebensharing.confirmDeleteTicket = Wollen Sie wirklich die Freigeben l\u00f6schen?sharing.downloadDate = Heruntergeladen amsharing.IP = IPsharing.url = Link zugriff :sharing.expiredTicket = Abgelaufene Freigebensharing.sizeFile = Gr\u00f6\u00dfesharing.downloadLink = Link zur Datei zum Herunterladensharing.maxValue = muss zwischen diese Werte seinsharing.shareFile = w\u00E4hlte, um die Datei zu teilen :sharing.downloadFileHelp = Um die Datei direkt herunterzuladen, <br/>machen Sie einen Rechten Mausklick. <br/>W\u00e4hlen Sie dann <b>Speichern unter</b> aus ...sharing.validity = G\u00FCltigkeitsharing.validity.continuous = dauerhaftesharing.validity.limited = begrenztesharing.notification.message.subject.file = Freigeben Sie einer Dateisharing.notification.message.subject.folder = Freigeben Sie einen Ordnersharing.notification.message.subject.publication = Freigeben Sie einer Ver\u00F6ffentlichungsharing.accessControl = Zugangskontrollesharing.access.unlimited = unbegrenztsharing.notification.notifFileLinkLabel = gehen Sie zu dieser Dateisharing.notification.notifFolderLinkLabel = gehen Sie zu dieser Ordnersharing.notification.notifPublicationLinkLabel = gehen Sie zu dieser Ver\u00F6ffentlichung
#
# Copyright (C) 2000 - 2026 Silverpeas
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# As a special exception to the terms and conditions of version 3.0 of
# the GPL, you may redistribute this Program in connection with Free/Libre
# Open Source Software ("FLOSS") applications as described in Silverpeas's
# FLOSS exception. You should have received a copy of the text describing
# the FLOSS exception, and it is also available here:
# "http://www.silverpeas.org/docs/core/legal/floss_exception.html"
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
sharing.tickets = Meine Freigeben
sharing.ticket = Freigeben
sharing.operation = Handlungen
sharing.updateTicket = Aktualisierung eine Freigeben
sharing.createTicket = Erstellung eine Freigeben
sharing.deleteTicket = L\u00f6schung eine Freigeben
sharing.creationDate = Erstellt am
sharing.by = von
sharing.updateDate = Aktualisiert am
sharing.endDate = G\u00FCltig bis
sharing.nbAccessMax = maximale Anzahl von Zugriffen
sharing.nbAccessMax.info = 0 = unbeschr\u00E4nkt zug\u00E4nglich
sharing.nbAccess = Anzahl von Zugriffen
sharing.token = Schl\u00FCssel
sharing.confirmTicket = Ihre Freigeben
sharing.confirmDeleteTicket = Wollen Sie wirklich die Freigeben l\u00f6schen?
sharing.downloadDate = Heruntergeladen am
sharing.IP = IP
sharing.url = Link zugriff :
sharing.expiredTicket = Abgelaufene Freigeben
sharing.invalideSecurityCode = Ung?ltiger Sicherheitscode
sharing.sizeFile = Gr\u00f6\u00dfe
sharing.downloadLink = Link zur Datei zum Herunterladen
sharing.maxValue = muss zwischen diese Werte sein
sharing.shareFile = w\u00E4hlte, um die Datei zu teilen :
sharing.downloadFileHelp = Um die Datei direkt herunterzuladen, <br/>machen Sie einen Rechten Mausklick. <br/>W\u00e4hlen Sie dann <b>Speichern unter</b> aus ...
sharing.validity = G\u00FCltigkeit
sharing.validity.continuous = dauerhafte
sharing.validity.limited = begrenzte
sharing.notification.message.subject.file = Freigeben Sie einer Datei
sharing.notification.message.subject.folder = Freigeben Sie einen Ordner
sharing.notification.message.subject.publication = Freigeben Sie einer Ver\u00F6ffentlichung
sharing.accessControl = Zugangskontrolle
sharing.access.unlimited = unbegrenzt
sharing.notification.notifFileLinkLabel = gehen Sie zu dieser Datei
sharing.notification.notifFolderLinkLabel = gehen Sie zu dieser Ordner
sharing.notification.notifPublicationLinkLabel = gehen Sie zu dieser Ver\u00F6ffentlichung
sharing.generation.code=Code generieren
sharing.generation.code.help=Falls angegeben, liegt es in Ihrer Verantwortung, diesen Code zu ?bermitteln
sharing.copy.code=Sicherheitscode kopieren
sharing.security.code=Sicherheitscode
sharing.confirmCopyInClipbloard=In die Zwischenablage kopiert

Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ sharing.downloadDate = Download on
sharing.IP = IP
sharing.url = Access link :
sharing.expiredTicket = Expired sharing
sharing.invalideSecurityCode = Invalide security code
sharing.sizeFile = Size
sharing.downloadLink = Link to the file to download
sharing.maxValue = must be between
Expand All @@ -56,4 +57,9 @@ sharing.accessControl = Access control
sharing.access.unlimited = Unlimited
sharing.notification.notifFileLinkLabel = Go to this file
sharing.notification.notifFolderLinkLabel = Go to this folder
sharing.notification.notifPublicationLinkLabel = Go to this publication
sharing.notification.notifPublicationLinkLabel = Go to this publication
sharing.generation.code=Generate a code
sharing.generation.code.help=If provided, it will be your responsibility to transmit this code
sharing.copy.code=Copy security code
sharing.security.code=Security code
sharing.confirmCopyInClipbloard=Copied to the clipboard
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ sharing.downloadDate = t\u00e9l\u00e9charg\u00e9 le
sharing.IP = IP
sharing.url = Lien d'acc\u00e8s :
sharing.expiredTicket = Le partage demand\u00e9 a expir\u00e9
sharing.invalideSecurityCode = Code de s\u00e9curit\u00e9 invalide
sharing.sizeFile = Taille
sharing.downloadLink = Lien vers le fichier \u00e0 t\u00e9l\u00e9charger
sharing.maxValue = doit \u00eatre compris entre
Expand All @@ -56,4 +57,9 @@ sharing.accessControl = Contr\u00f4le d'acc\u00e8s
sharing.access.unlimited = Illimit\u00e9
sharing.notification.notifFileLinkLabel = Voir ce fichier
sharing.notification.notifFolderLinkLabel = Voir ce dossier
sharing.notification.notifPublicationLinkLabel = Voir cette publication
sharing.notification.notifPublicationLinkLabel = Voir cette publication
sharing.generation.code=G\u00e9n\u00e9rer un code
sharing.generation.code.help=Si renseign\u00e9, il vous incombera de transmettre ce code
sharing.copy.code=Copier le code s\u00e9curit\u00e9
sharing.security.code=Code s\u00e9curit\u00e9
sharing.confirmCopyInClipbloard=Copi\u00e9 dans le presse papier
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ private T selectTranslation(String language) {
return translation;
}

public String getLanguage() {
if (StringUtil.isNotDefined(language)) {
public String getLanguage() {
if (getI18n().isEnabled() && StringUtil.isNotDefined(language)) {
return getI18n().getDefaultLanguage();
}
return language;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public class NodeTicket extends Ticket {
private static final long serialVersionUID = 8560572170859334369L;

public NodeTicket(int sharedObjectId, String componentId, String creatorId, Date creationDate,
Date endDate, int nbAccessMax) {
super(sharedObjectId, componentId, creatorId, creationDate, endDate, nbAccessMax);
Date endDate, int nbAccessMax, String securityCode) {
super(sharedObjectId, componentId, creatorId, creationDate, endDate, nbAccessMax, securityCode);
this.sharedObjectType = NODE_TYPE;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public class PublicationTicket extends Ticket {
private static final long serialVersionUID = 6661700474412230957L;

public PublicationTicket(int sharedObjectId, String componentId, String creatorId, Date creationDate,
Date endDate, int nbAccessMax) {
super(sharedObjectId, componentId, creatorId, creationDate, endDate, nbAccessMax);
Date endDate, int nbAccessMax, String securityCode) {
super(sharedObjectId, componentId, creatorId, creationDate, endDate, nbAccessMax, securityCode);
this.sharedObjectType = PUBLICATION_TYPE;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ protected SimpleFileTicket() {
}

public SimpleFileTicket(int sharedObjectId, String componentId, UserDetail creator,
Date creationDate, Date endDate, int nbAccessMax) {
super(sharedObjectId, componentId, creator, creationDate, endDate, nbAccessMax);
Date creationDate, Date endDate, int nbAccessMax, String securityCode) {
super(sharedObjectId, componentId, creator, creationDate, endDate, nbAccessMax, securityCode);
this.sharedObjectType = FILE_TYPE;
}

public SimpleFileTicket(int sharedObjectId, String componentId, String creatorId,
Date creationDate, Date endDate, int nbAccessMax) {
super(sharedObjectId, componentId, creatorId, creationDate, endDate, nbAccessMax);
Date creationDate, Date endDate, int nbAccessMax, String securityCode) {
super(sharedObjectId, componentId, creatorId, creationDate, endDate, nbAccessMax, securityCode);
this.sharedObjectType = FILE_TYPE;
}

Expand All @@ -67,8 +67,8 @@ public ShareableAccessControl getAccessControl() {
}

public SimpleFileTicket(String key, int sharedObjectId, String componentId, UserDetail creator,
Date creationDate, Date endDate, int nbAccessMax) {
super(sharedObjectId, componentId, creator, creationDate, endDate, nbAccessMax);
Date creationDate, Date endDate, int nbAccessMax, String securityCode) {
super(sharedObjectId, componentId, creator, creationDate, endDate, nbAccessMax, securityCode);
setId(key);
}

Expand Down
Loading