Compare commits
4 Commits
032f6a08df
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
271acacb1d | ||
|
|
f8206b5840 | ||
|
|
96b0dc76aa | ||
|
|
6a07c3e922 |
54
.github/workflows/docs.yml
vendored
Normal file
54
.github/workflows/docs.yml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
# Builds the MkDocs documentation and publishes it to GitHub Pages using the
|
||||
# native Pages flow (no gh-pages branch). Runs on every push to main that
|
||||
# touches the docs.
|
||||
#
|
||||
# One-time repository setup: Settings → Pages → Source: "GitHub Actions".
|
||||
name: docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "docs/**"
|
||||
- "mkdocs.yml"
|
||||
- ".github/workflows/docs.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: pages
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.x"
|
||||
|
||||
# Pinned to the version served by the local `docs` compose service
|
||||
# (squidfunk/mkdocs-material): keep the two in sync when upgrading.
|
||||
- run: pip install mkdocs-material==9.7.6
|
||||
|
||||
- run: mkdocs build --strict
|
||||
|
||||
- uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: site
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
@@ -25,7 +25,7 @@ nazionale svedese.
|
||||
| OpenAPI | **scegliere UNO** tra `darkaonline/l5-swagger` o `dedoc/scramble` (ora ci sono entrambi) |
|
||||
| Linked Art | `ml/json-ld` (serializzazione) + `opis/json-schema` (validazione contro gli schema RAÄ) |
|
||||
| Frontend | Vite + TypeScript, MPA con isole, Tailwind v4 + daisyUI, Leaflet |
|
||||
| Docs | MkDocs Material (`documentation/`) |
|
||||
| Docs | MkDocs Material (`docs/` + `mkdocs.yml` alla root; publish via GitHub Pages, `.github/workflows/docs.yml`) |
|
||||
| Qualità | SonarQube locale (`http://sonar.local`) |
|
||||
|
||||
## 3. Architettura dati (decisione chiave)
|
||||
@@ -115,13 +115,15 @@ Motivi e asimmetria backend/frontend:
|
||||
Usare i target del `Makefile` (incapsulano la strategia host/container del §6bis):
|
||||
|
||||
```bash
|
||||
make up # avvia l'intero stack dev (Vite HMR + backend + db + redis + docs + mailpit)
|
||||
make up # avvia l'intero stack dev (Vite HMR + backend + db + redis + mailpit)
|
||||
make migrate # artisan migrate (container come UID host)
|
||||
make import # ETL da v1 (quando implementato)
|
||||
make artisan c="test --coverage-clover=coverage.xml" # test backend
|
||||
make be-update # composer update (host)
|
||||
make fe-install # npm install host (package-lock + type-check IDE)
|
||||
make fe-rebuild # ricostruisce l'immagine frontend dopo modifiche a package.json
|
||||
make docs # anteprima MkDocs (http://localhost:8001/adc/) — publish: GitHub Pages
|
||||
make docs-check # build --strict della doc, come in CI (prima del push)
|
||||
make permissions # fix permessi storage (una tantum, sudo)
|
||||
make help # elenco completo
|
||||
```
|
||||
|
||||
121
LICENSES/CC0-1.0.txt
Normal file
121
LICENSES/CC0-1.0.txt
Normal file
@@ -0,0 +1,121 @@
|
||||
Creative Commons Legal Code
|
||||
|
||||
CC0 1.0 Universal
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||
HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer
|
||||
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||
authorship and/or a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for
|
||||
the purpose of contributing to a commons of creative, cultural and
|
||||
scientific works ("Commons") that the public can reliably and without fear
|
||||
of later claims of infringement build upon, modify, incorporate in other
|
||||
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||
and for any purposes, including without limitation commercial purposes.
|
||||
These owners may contribute to the Commons to promote the ideal of a free
|
||||
culture and the further production of creative, cultural and scientific
|
||||
works, or to gain reputation or greater distribution for their Work in
|
||||
part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any
|
||||
expectation of additional consideration or compensation, the person
|
||||
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||
protected by copyright and related or neighboring rights ("Copyright and
|
||||
Related Rights"). Copyright and Related Rights include, but are not
|
||||
limited to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display,
|
||||
communicate, and translate a Work;
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
iii. publicity and privacy rights pertaining to a person's image or
|
||||
likeness depicted in a Work;
|
||||
iv. rights protecting against unfair competition in regards to a Work,
|
||||
subject to the limitations in paragraph 4(a), below;
|
||||
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||
in a Work;
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal
|
||||
protection of databases, and under any national implementation
|
||||
thereof, including any amended or successor version of such
|
||||
directive); and
|
||||
vii. other similar, equivalent or corresponding rights throughout the
|
||||
world based on applicable law or treaty, and any national
|
||||
implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||
of action, whether now known or unknown (including existing as well as
|
||||
future claims and causes of action), in the Work (i) in all territories
|
||||
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||
treaty (including future time extensions), (iii) in any current or future
|
||||
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||
including without limitation commercial, advertising or promotional
|
||||
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||
member of the public at large and to the detriment of Affirmer's heirs and
|
||||
successors, fully intending that such Waiver shall not be subject to
|
||||
revocation, rescission, cancellation, termination, or any other legal or
|
||||
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||
as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||
be judged legally invalid or ineffective under applicable law, then the
|
||||
Waiver shall be preserved to the maximum extent permitted taking into
|
||||
account Affirmer's express Statement of Purpose. In addition, to the
|
||||
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||
maximum duration provided by applicable law or treaty (including future
|
||||
time extensions), (iii) in any current or future medium and for any number
|
||||
of copies, and (iv) for any purpose whatsoever, including without
|
||||
limitation commercial, advertising or promotional purposes (the
|
||||
"License"). The License shall be deemed effective as of the date CC0 was
|
||||
applied by Affirmer to the Work. Should any part of the License for any
|
||||
reason be judged legally invalid or ineffective under applicable law, such
|
||||
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||
of the License, and in such case Affirmer hereby affirms that he or she
|
||||
will not (i) exercise any of his or her remaining Copyright and Related
|
||||
Rights in the Work or (ii) assert any associated claims and causes of
|
||||
action with respect to the Work, in either case contrary to Affirmer's
|
||||
express Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||
surrendered, licensed or otherwise affected by this document.
|
||||
b. Affirmer offers the Work as-is and makes no representations or
|
||||
warranties of any kind concerning the Work, express, implied,
|
||||
statutory or otherwise, including without limitation warranties of
|
||||
title, merchantability, fitness for a particular purpose, non
|
||||
infringement, or the absence of latent or other defects, accuracy, or
|
||||
the present or absence of errors, whether or not discoverable, all to
|
||||
the greatest extent permissible under applicable law.
|
||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without
|
||||
limitation any person's Copyright and Related Rights in the Work.
|
||||
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||
consents, permissions or other rights required for any use of the
|
||||
Work.
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||
party to this document and has no duty or obligation with respect to
|
||||
this CC0 or use of the Work.
|
||||
14
Makefile
14
Makefile
@@ -12,13 +12,17 @@ DC := docker compose
|
||||
EXEC := $(DC) exec -u $(UID):$(GID) backend
|
||||
|
||||
.DEFAULT_GOAL := help
|
||||
.PHONY: help up down build logs composer be-install be-update artisan migrate import tinker test fe-install fe-add fe-rebuild fe-dev fe-build fe-lint-css fe-lint-css-fix permissions
|
||||
.PHONY: help up down build logs composer be-install be-update artisan migrate import tinker test fe-install fe-add fe-rebuild fe-dev fe-build fe-lint-css fe-lint-css-fix docs docs-check permissions
|
||||
|
||||
# Stessa versione pinnata nella CI (.github/workflows/docs.yml): allineare insieme.
|
||||
MKDOCS_IMG := squidfunk/mkdocs-material:9.7.6
|
||||
MKDOCS_VOL := -v $(CURDIR)/mkdocs.yml:/docs/mkdocs.yml:ro -v $(CURDIR)/docs:/docs/docs:ro
|
||||
|
||||
help: ## Mostra questo aiuto
|
||||
@grep -hE '^[a-zA-Z_-]+:.*?## ' $(MAKEFILE_LIST) | awk 'BEGIN{FS=":.*?## "}{printf " \033[36m%-14s\033[0m %s\n",$$1,$$2}'
|
||||
|
||||
## --- Stack ---
|
||||
up: ## Avvia l'intero stack dev: Vite HMR + backend(serve) + db + redis + docs + mailpit
|
||||
up: ## Avvia l'intero stack dev: Vite HMR + backend(serve) + db + redis + mailpit
|
||||
$(DC) up -d
|
||||
down: ## Ferma lo stack
|
||||
$(DC) down
|
||||
@@ -76,6 +80,12 @@ fe-lint-css: ## Stylelint (check) nel container — gira anche nel pre-commit
|
||||
$(DC) exec -T frontend npm run lint:css
|
||||
fe-lint-css-fix: ## Stylelint con --fix (container come UID host: scrive sul bind-mount)
|
||||
$(DC) exec -u $(UID):$(GID) -T frontend npm run lint:css:fix
|
||||
## --- Documentazione (pubblicata da GitHub Pages, .github/workflows/docs.yml) ---
|
||||
docs: ## Anteprima locale MkDocs con live reload su http://localhost:8001/adc/ (Ctrl+C per uscire; la 8000 è del backend)
|
||||
docker run --rm -p 8001:8000 $(MKDOCS_VOL) $(MKDOCS_IMG) serve --dev-addr=0.0.0.0:8000
|
||||
docs-check: ## Build --strict come in CI (fallisce su link rotti): da lanciare prima del push
|
||||
docker run --rm $(MKDOCS_VOL) $(MKDOCS_IMG) build --strict --site-dir /tmp/site
|
||||
|
||||
## --- Manutenzione ---
|
||||
permissions: ## Permessi storage scrivibili da php-fpm (www-data) — richiede sudo, una tantum
|
||||
sudo chgrp -R www-data backend/storage backend/bootstrap/cache
|
||||
|
||||
15
REUSE.toml
15
REUSE.toml
@@ -15,7 +15,7 @@ SPDX-License-Identifier = "EUPL-1.2"
|
||||
|
||||
# Documentazione utente (sito MkDocs): CC-BY-4.0.
|
||||
[[annotations]]
|
||||
path = "documentation/**"
|
||||
path = ["docs/**", "mkdocs.yml"]
|
||||
precedence = "override"
|
||||
SPDX-FileCopyrightText = "2026 Giuseppe Naponiello"
|
||||
SPDX-License-Identifier = "CC-BY-4.0"
|
||||
@@ -27,3 +27,16 @@ path = "frontend/public/vendor/3dhop/**"
|
||||
precedence = "override"
|
||||
SPDX-FileCopyrightText = "2014-2020 Visual Computing Lab, ISTI - CNR"
|
||||
SPDX-License-Identifier = "GPL-3.0-or-later"
|
||||
|
||||
# Testi delle licenze offerti in download insieme ai media (colonna `file` della
|
||||
# tabella `licenses`, vedi LicenseSeeder), serviti al frontend via storage:link.
|
||||
# NON sono le licenze del repository: non possono stare in LICENSES/ (un testo
|
||||
# non referenziato dal codice fa fallire `reuse lint` come "unused license").
|
||||
# Creative Commons dedica il testo delle proprie licenze al pubblico dominio (CC0):
|
||||
# https://creativecommons.org/policies/#license — da qui l'annotazione, che a sua
|
||||
# volta richiede LICENSES/CC0-1.0.txt nella root.
|
||||
[[annotations]]
|
||||
path = "backend/storage/app/public/licenses/**"
|
||||
precedence = "override"
|
||||
SPDX-FileCopyrightText = "Creative Commons Corporation"
|
||||
SPDX-License-Identifier = "CC0-1.0"
|
||||
|
||||
32
backend/app/Actions/Fortify/AuthenticateUser.php
Normal file
32
backend/app/Actions/Fortify/AuthenticateUser.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Fortify;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Laravel\Fortify\Fortify;
|
||||
|
||||
/**
|
||||
* Login custom: oltre a verificare le credenziali, blocca gli utenti con
|
||||
* `disabled_at` impostato (es. legacy `is_active=false`). I soft-deleted sono
|
||||
* già esclusi dalla query di default (scope SoftDeletes sul model User), non
|
||||
* serve un controllo esplicito.
|
||||
*
|
||||
* Registrata via `Fortify::authenticateUsing()`: viene consultata sia dal
|
||||
* pre-check 2FA (`RedirectIfTwoFactorAuthenticatable`) sia dal fallback
|
||||
* (`AttemptToAuthenticate`), quindi un solo punto di applicazione del gate.
|
||||
*/
|
||||
class AuthenticateUser
|
||||
{
|
||||
public function __invoke(Request $request): ?User
|
||||
{
|
||||
$user = User::where(Fortify::username(), $request->input(Fortify::username()))->first();
|
||||
|
||||
if (! $user || ! Hash::check((string) $request->input('password'), $user->password)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $user->disabled_at === null ? $user : null;
|
||||
}
|
||||
}
|
||||
32
backend/app/Enums/LicenseKind.php
Normal file
32
backend/app/Enums/LicenseKind.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
/**
|
||||
* Natura della voce nella tabella `licenses`.
|
||||
*
|
||||
* Non tutto ciò che si applica a record e media è una licenza in senso
|
||||
* stretto: il Public Domain Mark è un *marchio* (dichiara uno stato
|
||||
* esistente, non concede diritti) e gli statement di RightsStatements.org
|
||||
* etichettano lo stato dei diritti senza concederne. La distinzione serve a
|
||||
* UI e download: solo le voci `License` hanno un testo legale da includere
|
||||
* nello zip dei media (colonna `file`).
|
||||
*/
|
||||
enum LicenseKind: string
|
||||
{
|
||||
case License = 'license';
|
||||
case Mark = 'mark';
|
||||
case RightsStatement = 'rights_statement';
|
||||
|
||||
/**
|
||||
* Etichetta leggibile per la UI (inglese: lingua ufficiale dell'applicazione).
|
||||
*/
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::License => 'License',
|
||||
self::Mark => 'Public domain mark',
|
||||
self::RightsStatement => 'Rights statement',
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -78,7 +78,9 @@ class InstitutionImporter implements Importer
|
||||
if (! in_array($categoryId, $validCategoryIds, true)) {
|
||||
$summary->warn(sprintf(
|
||||
"Institution legacy #%d ('%s') : category %d assente nel lookup v2 → saltata.",
|
||||
$row->id, trim((string) $row->name), $categoryId,
|
||||
$row->id,
|
||||
trim((string) $row->name),
|
||||
$categoryId,
|
||||
));
|
||||
$summary->skipped++;
|
||||
|
||||
|
||||
96
backend/app/Http/Controllers/LicenseController.php
Normal file
96
backend/app/Http/Controllers/LicenseController.php
Normal file
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Requests\IndexLicenseRequest;
|
||||
use App\Http\Requests\StoreLicenseRequest;
|
||||
use App\Http\Requests\UpdateLicenseRequest;
|
||||
use App\Http\Traits\ApiResponse;
|
||||
use App\Models\Lists\License;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
/**
|
||||
* CRUD del vocabolario licenze (scrittura riservata agli Admin).
|
||||
*
|
||||
* NB gli id 1-3 sono allineati al legacy e verranno usati dall'ETL per
|
||||
* mappare le FK di artifact/media: per ritirare una licenza usare
|
||||
* `active = false`, non la cancellazione. Nessun soft delete su questo lookup.
|
||||
*/
|
||||
class LicenseController extends Controller
|
||||
{
|
||||
use ApiResponse;
|
||||
|
||||
/**
|
||||
* Elenco delle licenze, ordinate per `sort_order` (dalla più aperta alla
|
||||
* più restrittiva). Filtri: `scope=record|media` (select dei form),
|
||||
* `active=1` (esclude le licenze ritirate).
|
||||
*/
|
||||
public function index(IndexLicenseRequest $request): JsonResponse
|
||||
{
|
||||
$query = License::query()->orderBy('sort_order')->orderBy('acronym');
|
||||
|
||||
match ($request->input('scope')) {
|
||||
'record' => $query->forRecord(),
|
||||
'media' => $query->forMedia(),
|
||||
default => null,
|
||||
};
|
||||
|
||||
if ($request->filled('active')) {
|
||||
$query->where('active', $request->boolean('active'));
|
||||
}
|
||||
|
||||
return $this->collectionResponse($query->get());
|
||||
}
|
||||
|
||||
/**
|
||||
* Crea una licenza.
|
||||
*/
|
||||
public function store(StoreLicenseRequest $request): JsonResponse
|
||||
{
|
||||
$license = License::create($request->validated());
|
||||
|
||||
return $this->createdResponse($license);
|
||||
}
|
||||
|
||||
/**
|
||||
* Dettaglio di una licenza.
|
||||
*/
|
||||
public function show(License $license): JsonResponse
|
||||
{
|
||||
return $this->okResponse($license);
|
||||
}
|
||||
|
||||
/**
|
||||
* Aggiorna una licenza (anche parzialmente, es. solo `active`).
|
||||
*/
|
||||
public function update(UpdateLicenseRequest $request, License $license): JsonResponse
|
||||
{
|
||||
$license->update($request->validated());
|
||||
|
||||
return $this->updatedResponse($license);
|
||||
}
|
||||
|
||||
/**
|
||||
* Elimina una licenza (se non assegnata ad alcun contenuto).
|
||||
*/
|
||||
public function destroy(License $license): JsonResponse
|
||||
{
|
||||
if ($license->isInUse()) {
|
||||
return $this->conflictResponse('Cannot delete: license assigned to at least one record or media file.');
|
||||
}
|
||||
|
||||
$license->delete();
|
||||
|
||||
return $this->deletedResponse();
|
||||
}
|
||||
|
||||
/**
|
||||
* Indica se la licenza è in uso (bloccata per l'eliminazione).
|
||||
*/
|
||||
public function usage(License $license): JsonResponse
|
||||
{
|
||||
return response()->json([
|
||||
'in_use' => $license->isInUse(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
138
backend/app/Http/Controllers/UserAffiliationController.php
Normal file
138
backend/app/Http/Controllers/UserAffiliationController.php
Normal file
@@ -0,0 +1,138 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Requests\IndexUserAffiliationRequest;
|
||||
use App\Http\Requests\StoreUserAffiliationRequest;
|
||||
use App\Http\Requests\UpdateUserAffiliationRequest;
|
||||
use App\Http\Traits\ApiResponse;
|
||||
use App\Models\UserAffiliation;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
/**
|
||||
* CRUD delle affiliazioni utente-ente (scrittura riservata agli Admin via tier
|
||||
* di rotta). Risorsa standalone: institution_id, user_id e user_position_id
|
||||
* viaggiano nel body, non nella route (l'affiliazione ha due "genitori" forti).
|
||||
*
|
||||
* Soft delete: destroy = cestina, restore = ripristina, forceDestroy = elimina
|
||||
* definitivamente.
|
||||
*/
|
||||
class UserAffiliationController extends Controller
|
||||
{
|
||||
use ApiResponse;
|
||||
|
||||
/**
|
||||
* Elenco paginato, con filtri opzionali (ente, utente, posizione, aperte/chiuse, cestino).
|
||||
*/
|
||||
public function index(IndexUserAffiliationRequest $request): JsonResponse
|
||||
{
|
||||
$query = UserAffiliation::query()
|
||||
->with(['institution', 'user', 'userPosition'])
|
||||
->orderByDesc('start_year');
|
||||
|
||||
$this->applyTrashed($query, $request->input('trashed'));
|
||||
|
||||
if ($request->filled('institution_id')) {
|
||||
$query->where('institution_id', $request->integer('institution_id'));
|
||||
}
|
||||
|
||||
if ($request->filled('user_id')) {
|
||||
$query->where('user_id', $request->integer('user_id'));
|
||||
}
|
||||
|
||||
if ($request->filled('user_position_id')) {
|
||||
$query->where('user_position_id', $request->integer('user_position_id'));
|
||||
}
|
||||
|
||||
if ($request->filled('open')) {
|
||||
$request->boolean('open')
|
||||
? $query->whereNotNull('is_open')
|
||||
: $query->whereNull('is_open');
|
||||
}
|
||||
|
||||
$affiliations = $query->paginate($request->integer('per_page') ?: 20);
|
||||
|
||||
return $this->paginatedCollectionResponse($affiliations);
|
||||
}
|
||||
|
||||
/**
|
||||
* Crea un'affiliazione.
|
||||
*/
|
||||
public function store(StoreUserAffiliationRequest $request): JsonResponse
|
||||
{
|
||||
$affiliation = UserAffiliation::create($request->validated());
|
||||
|
||||
return $this->createdResponse($affiliation->load(['institution', 'user', 'userPosition']));
|
||||
}
|
||||
|
||||
/**
|
||||
* Dettaglio (con ente, utente e posizione).
|
||||
*/
|
||||
public function show(UserAffiliation $userAffiliation): JsonResponse
|
||||
{
|
||||
return $this->okResponse($userAffiliation->load(['institution', 'user', 'userPosition']));
|
||||
}
|
||||
|
||||
/**
|
||||
* Aggiorna un'affiliazione.
|
||||
*/
|
||||
public function update(UpdateUserAffiliationRequest $request, UserAffiliation $userAffiliation): JsonResponse
|
||||
{
|
||||
$userAffiliation->update($request->validated());
|
||||
|
||||
return $this->updatedResponse($userAffiliation->load(['institution', 'user', 'userPosition']));
|
||||
}
|
||||
|
||||
/**
|
||||
* Cestina (soft delete).
|
||||
*/
|
||||
public function destroy(UserAffiliation $userAffiliation): JsonResponse
|
||||
{
|
||||
$userAffiliation->delete();
|
||||
|
||||
return $this->deletedResponse();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ripristina un'affiliazione cestinata. Bloccato (409) se nel frattempo è
|
||||
* stata aperta un'altra affiliazione per lo stesso ente+utente: va prima
|
||||
* chiusa/eliminata quella attuale, oppure si elimina definitivamente questa.
|
||||
*/
|
||||
public function restore(UserAffiliation $userAffiliation): JsonResponse
|
||||
{
|
||||
if ($userAffiliation->hasConflictingOpenAffiliation()) {
|
||||
return $this->conflictResponse(
|
||||
'Cannot restore: another open affiliation already exists for this user at this institution.'
|
||||
);
|
||||
}
|
||||
|
||||
$userAffiliation->restore();
|
||||
|
||||
return $this->restoredResponse($userAffiliation->load(['institution', 'user', 'userPosition']));
|
||||
}
|
||||
|
||||
/**
|
||||
* Elimina definitivamente un'affiliazione.
|
||||
*/
|
||||
public function forceDestroy(UserAffiliation $userAffiliation): JsonResponse
|
||||
{
|
||||
$userAffiliation->forceDelete();
|
||||
|
||||
return $this->deletedResponse();
|
||||
}
|
||||
|
||||
/**
|
||||
* Include i soft-deleted: `with` (tutti) o `only` (solo cestinati).
|
||||
*
|
||||
* @param Builder<UserAffiliation> $query
|
||||
*/
|
||||
private function applyTrashed(Builder $query, ?string $trashed): void
|
||||
{
|
||||
match ($trashed) {
|
||||
'with' => $query->withTrashed(),
|
||||
'only' => $query->onlyTrashed(),
|
||||
default => null,
|
||||
};
|
||||
}
|
||||
}
|
||||
33
backend/app/Http/Requests/IndexLicenseRequest.php
Normal file
33
backend/app/Http/Requests/IndexLicenseRequest.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class IndexLicenseRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Rotta pubblica: l'elenco delle licenze è informazione pubblica.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* `scope` filtra le select dei form: `record` per artifact/model (solo
|
||||
* licenze aperte), `media` per i file caricati (tutte). `active` esclude
|
||||
* le licenze ritirate dagli admin.
|
||||
*
|
||||
* @return array<string, ValidationRule|array<mixed>|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'scope' => ['nullable', Rule::in(['record', 'media'])],
|
||||
'active' => ['nullable', 'boolean'],
|
||||
];
|
||||
}
|
||||
}
|
||||
33
backend/app/Http/Requests/IndexUserAffiliationRequest.php
Normal file
33
backend/app/Http/Requests/IndexUserAffiliationRequest.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class IndexUserAffiliationRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* L'autorizzazione è gestita dal middleware di rotta (tier.app).
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, ValidationRule|array<mixed>|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'institution_id' => ['nullable', 'integer', 'exists:institutions,id'],
|
||||
'user_id' => ['nullable', 'integer', 'exists:users,id'],
|
||||
'user_position_id' => ['nullable', 'integer', 'exists:user_positions,id'],
|
||||
'open' => ['nullable', 'boolean'],
|
||||
'trashed' => ['nullable', Rule::in(['with', 'only'])],
|
||||
'per_page' => ['nullable', 'integer', 'min:1', 'max:100'],
|
||||
];
|
||||
}
|
||||
}
|
||||
41
backend/app/Http/Requests/StoreLicenseRequest.php
Normal file
41
backend/app/Http/Requests/StoreLicenseRequest.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Enums\LicenseKind;
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class StoreLicenseRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* L'autorizzazione (solo Admin) è gestita dal middleware di rotta.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, ValidationRule|array<mixed>|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'name' => ['required', 'string', 'max:200', 'unique:licenses,name'],
|
||||
'acronym' => ['required', 'string', 'max:50', 'unique:licenses,acronym'],
|
||||
// Solo id della SPDX License List ufficiale: per marchi e rights
|
||||
// statement (che non vi compaiono) deve restare NULL.
|
||||
'spdx_id' => ['nullable', 'string', 'max:50', 'unique:licenses,spdx_id'],
|
||||
'kind' => ['required', Rule::enum(LicenseKind::class)],
|
||||
'description' => ['nullable', 'string'],
|
||||
'uri' => ['nullable', 'url', 'max:2000'],
|
||||
'file' => ['nullable', 'string', 'max:512'],
|
||||
'for_record' => ['sometimes', 'boolean'],
|
||||
'for_media' => ['sometimes', 'boolean'],
|
||||
'sort_order' => ['sometimes', 'integer', 'min:0'],
|
||||
'active' => ['sometimes', 'boolean'],
|
||||
];
|
||||
}
|
||||
}
|
||||
28
backend/app/Http/Requests/StoreUserAffiliationRequest.php
Normal file
28
backend/app/Http/Requests/StoreUserAffiliationRequest.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Traits\ValidatesUserAffiliation;
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class StoreUserAffiliationRequest extends FormRequest
|
||||
{
|
||||
use ValidatesUserAffiliation;
|
||||
|
||||
/**
|
||||
* L'autorizzazione (solo Admin) è gestita dal middleware di rotta.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, ValidationRule|array<mixed>|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return $this->userAffiliationRules();
|
||||
}
|
||||
}
|
||||
43
backend/app/Http/Requests/UpdateLicenseRequest.php
Normal file
43
backend/app/Http/Requests/UpdateLicenseRequest.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Enums\LicenseKind;
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class UpdateLicenseRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* L'autorizzazione (solo Admin) è gestita dal middleware di rotta.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Aggiornamento parziale: ogni campo è validato solo se presente.
|
||||
*
|
||||
* @return array<string, ValidationRule|array<mixed>|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
$id = $this->route('license')->id;
|
||||
|
||||
return [
|
||||
'name' => ['sometimes', 'required', 'string', 'max:200', Rule::unique('licenses', 'name')->ignore($id)],
|
||||
'acronym' => ['sometimes', 'required', 'string', 'max:50', Rule::unique('licenses', 'acronym')->ignore($id)],
|
||||
'spdx_id' => ['nullable', 'string', 'max:50', Rule::unique('licenses', 'spdx_id')->ignore($id)],
|
||||
'kind' => ['sometimes', 'required', Rule::enum(LicenseKind::class)],
|
||||
'description' => ['nullable', 'string'],
|
||||
'uri' => ['nullable', 'url', 'max:2000'],
|
||||
'file' => ['nullable', 'string', 'max:512'],
|
||||
'for_record' => ['sometimes', 'boolean'],
|
||||
'for_media' => ['sometimes', 'boolean'],
|
||||
'sort_order' => ['sometimes', 'integer', 'min:0'],
|
||||
'active' => ['sometimes', 'boolean'],
|
||||
];
|
||||
}
|
||||
}
|
||||
28
backend/app/Http/Requests/UpdateUserAffiliationRequest.php
Normal file
28
backend/app/Http/Requests/UpdateUserAffiliationRequest.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Traits\ValidatesUserAffiliation;
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UpdateUserAffiliationRequest extends FormRequest
|
||||
{
|
||||
use ValidatesUserAffiliation;
|
||||
|
||||
/**
|
||||
* L'autorizzazione (solo Admin) è gestita dal middleware di rotta.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, ValidationRule|array<mixed>|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return $this->userAffiliationRules($this->route('user_affiliation')->id);
|
||||
}
|
||||
}
|
||||
40
backend/app/Http/Traits/ValidatesUserAffiliation.php
Normal file
40
backend/app/Http/Traits/ValidatesUserAffiliation.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Traits;
|
||||
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
/**
|
||||
* Regole condivise da Store/UpdateUserAffiliationRequest. Unica differenza tra
|
||||
* le due: l'update ignora se stesso nel controllo di unicità sull'incarico aperto.
|
||||
*/
|
||||
trait ValidatesUserAffiliation
|
||||
{
|
||||
/**
|
||||
* @return array<string, array<int, mixed>>
|
||||
*/
|
||||
protected function userAffiliationRules(?int $ignoreId = null): array
|
||||
{
|
||||
$rules = [
|
||||
'institution_id' => ['required', 'integer', 'exists:institutions,id'],
|
||||
'user_id' => ['required', 'integer', 'exists:users,id'],
|
||||
'user_position_id' => ['required', 'integer', 'exists:user_positions,id'],
|
||||
'start_year' => ['required', 'integer', 'min:1800', 'max:'.now()->year],
|
||||
'end_year' => ['nullable', 'integer', 'min:1800', 'gte:start_year'],
|
||||
];
|
||||
|
||||
// Un utente non può avere più di un incarico aperto (end_year nullo) nello
|
||||
// stesso ente: il guard definitivo è l'indice unique sulla colonna virtuale
|
||||
// is_open, qui serve solo a restituire un 422 leggibile invece di un 500 SQL.
|
||||
// I soft-deleted non contano: un cestinato non blocca un nuovo incarico aperto.
|
||||
if (! $this->filled('end_year')) {
|
||||
$rules['institution_id'][] = Rule::unique('user_affiliations', 'institution_id')
|
||||
->where('user_id', $this->input('user_id'))
|
||||
->whereNull('end_year')
|
||||
->whereNull('deleted_at')
|
||||
->ignore($ignoreId);
|
||||
}
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
||||
@@ -87,4 +87,14 @@ class Institution extends Model implements Auditable
|
||||
{
|
||||
return $this->hasMany(InstitutionLink::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Storico delle affiliazioni (staff) di questa istituzione.
|
||||
*
|
||||
* @return HasMany<UserAffiliation, $this>
|
||||
*/
|
||||
public function affiliations(): HasMany
|
||||
{
|
||||
return $this->hasMany(UserAffiliation::class);
|
||||
}
|
||||
}
|
||||
|
||||
99
backend/app/Models/Lists/License.php
Normal file
99
backend/app/Models/Lists/License.php
Normal file
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Lists;
|
||||
|
||||
use App\Enums\LicenseKind;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use OwenIt\Auditing\Auditable as AuditableTrait;
|
||||
use OwenIt\Auditing\Contracts\Auditable;
|
||||
|
||||
/**
|
||||
* Vocabolario delle licenze per record (artifact/model) e media.
|
||||
*
|
||||
* Tabella controllata, popolata dal LicenseSeeder in installazione (non
|
||||
* dall'ETL). Gli id 1-3 sono FISSI e coincidono con il DB legacy (v1:
|
||||
* 1=Public Domain, 2=CC0, 3=CC BY) così l'ETL mapperà le FK dei contenuti
|
||||
* 1:1 senza tradurre.
|
||||
*
|
||||
* Il ritiro di una licenza si fa con `active = false` (le select dei form la
|
||||
* nascondono), mai cancellando la riga: i contenuti già licenziati la
|
||||
* referenziano.
|
||||
*/
|
||||
class License extends Model implements Auditable
|
||||
{
|
||||
use AuditableTrait;
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'acronym',
|
||||
'spdx_id',
|
||||
'kind',
|
||||
'description',
|
||||
'uri',
|
||||
'file',
|
||||
'for_record',
|
||||
'for_media',
|
||||
'sort_order',
|
||||
'active',
|
||||
];
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'kind' => LicenseKind::class,
|
||||
'for_record' => 'boolean',
|
||||
'for_media' => 'boolean',
|
||||
'sort_order' => 'integer',
|
||||
'active' => 'boolean',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Licenze ammesse per i record (artifact/model): solo quelle aperte.
|
||||
*
|
||||
* @param Builder<License> $query
|
||||
*/
|
||||
public function scopeForRecord(Builder $query): void
|
||||
{
|
||||
$query->where('for_record', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Licenze ammesse per i media (immagini, documenti, video, modelli 3D).
|
||||
*
|
||||
* @param Builder<License> $query
|
||||
*/
|
||||
public function scopeForMedia(Builder $query): void
|
||||
{
|
||||
$query->where('for_media', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Solo le licenze attive (proposte nei form di inserimento/modifica).
|
||||
*
|
||||
* @param Builder<License> $query
|
||||
*/
|
||||
public function scopeActive(Builder $query): void
|
||||
{
|
||||
$query->where('active', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* La licenza è assegnata ad almeno un contenuto.
|
||||
*
|
||||
* NB: oggi nessuna tabella referenzia `licenses`, quindi nessuna riga
|
||||
* risulta in uso; quando arriveranno le tabelle di artifact/model/media
|
||||
* (con FK su `licenses`) questo metodo dovrà controllarne l'esistenza,
|
||||
* come fa InstitutionCategory::isInUse().
|
||||
*/
|
||||
public function isInUse(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ use App\Notifications\ResetPasswordNotification;
|
||||
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
@@ -16,7 +17,7 @@ use OwenIt\Auditing\Contracts\Auditable;
|
||||
|
||||
class User extends Authenticatable implements Auditable, MustVerifyEmail
|
||||
{
|
||||
/** @use HasFactory<UserFactory> */
|
||||
/** @use HasFactory<\Database\Factories\UserFactory> */
|
||||
use HasApiTokens, HasFactory, Notifiable, SoftDeletes;
|
||||
|
||||
use \OwenIt\Auditing\Auditable;
|
||||
@@ -72,6 +73,7 @@ class User extends Authenticatable implements Auditable, MustVerifyEmail
|
||||
'two_factor_confirmed_at' => 'datetime',
|
||||
'is_system' => 'boolean',
|
||||
'anonymized_at' => 'datetime',
|
||||
'disabled_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -85,6 +87,16 @@ class User extends Authenticatable implements Auditable, MustVerifyEmail
|
||||
return $this->belongsTo(UserRole::class, 'role_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Storico delle affiliazioni (incarichi) di questo utente.
|
||||
*
|
||||
* @return HasMany<UserAffiliation, $this>
|
||||
*/
|
||||
public function affiliations(): HasMany
|
||||
{
|
||||
return $this->hasMany(UserAffiliation::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send the password reset notification.
|
||||
*/
|
||||
|
||||
97
backend/app/Models/UserAffiliation.php
Normal file
97
backend/app/Models/UserAffiliation.php
Normal file
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\Lists\UserPosition;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use OwenIt\Auditing\Auditable as AuditableTrait;
|
||||
use OwenIt\Auditing\Contracts\Auditable;
|
||||
|
||||
class UserAffiliation extends Model implements Auditable
|
||||
{
|
||||
use AuditableTrait;
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
protected $fillable = [
|
||||
'institution_id',
|
||||
'user_id',
|
||||
'user_position_id',
|
||||
'start_year',
|
||||
'end_year',
|
||||
'legacy_user_id',
|
||||
'legacy_institution_id',
|
||||
];
|
||||
|
||||
/**
|
||||
* Bookkeeping ETL, non rilevanti per l'admin UI.
|
||||
*
|
||||
* @var list<string>
|
||||
*/
|
||||
protected $hidden = [
|
||||
'legacy_user_id',
|
||||
'legacy_institution_id',
|
||||
];
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'institution_id' => 'integer',
|
||||
'user_id' => 'integer',
|
||||
'user_position_id' => 'integer',
|
||||
'start_year' => 'integer',
|
||||
'end_year' => 'integer',
|
||||
'is_open' => 'boolean',
|
||||
'legacy_user_id' => 'integer',
|
||||
'legacy_institution_id' => 'integer',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsTo<Institution, $this>
|
||||
*/
|
||||
public function institution(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Institution::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsTo<User, $this>
|
||||
*/
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsTo<UserPosition, $this>
|
||||
*/
|
||||
public function userPosition(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(UserPosition::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Esiste già un'altra affiliazione aperta per lo stesso ente+utente: un
|
||||
* restore qui urterebbe l'indice unique su (institution_id, user_id, is_open).
|
||||
*/
|
||||
public function hasConflictingOpenAffiliation(): bool
|
||||
{
|
||||
if (filled($this->end_year)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return self::query()
|
||||
->where('institution_id', $this->institution_id)
|
||||
->where('user_id', $this->user_id)
|
||||
->where('id', '!=', $this->id)
|
||||
->whereNotNull('is_open')
|
||||
->exists();
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Actions\Fortify\AuthenticateUser;
|
||||
use App\Actions\Fortify\CreateNewUser;
|
||||
use App\Actions\Fortify\ResetUserPassword;
|
||||
use App\Actions\Fortify\UpdateUserPassword;
|
||||
@@ -29,6 +30,7 @@ class FortifyServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
Fortify::authenticateUsing(new AuthenticateUser);
|
||||
Fortify::createUsersUsing(CreateNewUser::class);
|
||||
Fortify::updateUserProfileInformationUsing(UpdateUserProfileInformation::class);
|
||||
Fortify::updateUserPasswordsUsing(UpdateUserPassword::class);
|
||||
|
||||
63
backend/database/factories/Lists/LicenseFactory.php
Normal file
63
backend/database/factories/Lists/LicenseFactory.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories\Lists;
|
||||
|
||||
use App\Enums\LicenseKind;
|
||||
use App\Models\Lists\License;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<License>
|
||||
*/
|
||||
class LicenseFactory extends Factory
|
||||
{
|
||||
protected $model = License::class;
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => ucfirst(fake()->unique()->words(3, true)),
|
||||
'acronym' => strtoupper(fake()->unique()->bothify('??-#.#')),
|
||||
'spdx_id' => null,
|
||||
'kind' => LicenseKind::License,
|
||||
'description' => fake()->sentence(),
|
||||
'uri' => fake()->url(),
|
||||
'file' => null,
|
||||
'for_record' => false,
|
||||
'for_media' => true,
|
||||
'sort_order' => fake()->numberBetween(0, 100),
|
||||
'active' => true,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Licenza aperta ammessa anche per i record.
|
||||
*/
|
||||
public function forRecord(): static
|
||||
{
|
||||
return $this->state(fn () => ['for_record' => true]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rights statement (nessun testo legale, nessun id SPDX).
|
||||
*/
|
||||
public function rightsStatement(): static
|
||||
{
|
||||
return $this->state(fn () => [
|
||||
'kind' => LicenseKind::RightsStatement,
|
||||
'spdx_id' => null,
|
||||
'file' => null,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Licenza ritirata dagli admin (esclusa dalle select dei form).
|
||||
*/
|
||||
public function inactive(): static
|
||||
{
|
||||
return $this->state(fn () => ['active' => false]);
|
||||
}
|
||||
}
|
||||
33
backend/database/factories/UserAffiliationFactory.php
Normal file
33
backend/database/factories/UserAffiliationFactory.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Institution;
|
||||
use App\Models\Lists\UserPosition;
|
||||
use App\Models\User;
|
||||
use App\Models\UserAffiliation;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<UserAffiliation>
|
||||
*/
|
||||
class UserAffiliationFactory extends Factory
|
||||
{
|
||||
protected $model = UserAffiliation::class;
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'institution_id' => Institution::factory(),
|
||||
'user_id' => User::factory(),
|
||||
'user_position_id' => UserPosition::factory(),
|
||||
'start_year' => fake()->numberBetween(1980, (int) date('Y')),
|
||||
'end_year' => null,
|
||||
'legacy_user_id' => null,
|
||||
'legacy_institution_id' => null,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('user_affiliations', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('institution_id')
|
||||
->constrained('institutions')
|
||||
->cascadeOnUpdate()
|
||||
->cascadeOnDelete();
|
||||
$table->foreignId('user_id')
|
||||
->constrained('users')
|
||||
->cascadeOnUpdate()
|
||||
->cascadeOnDelete();
|
||||
$table->foreignId('user_position_id')
|
||||
->constrained('user_positions')
|
||||
->cascadeOnUpdate()
|
||||
->cascadeOnDelete();
|
||||
$table->integer('start_year');
|
||||
$table->integer('end_year')->nullable();
|
||||
$table->softDeletes();
|
||||
// Aperta = end_year nullo E non cestinata: un soft delete libera lo slot
|
||||
// per un nuovo incarico aperto, senza dover aspettare un restore/force.
|
||||
$table->boolean('is_open')->virtualAs('IF(`end_year` IS NULL AND `deleted_at` IS NULL, 1, NULL)');
|
||||
// Legacy: in v1 affiliazione/posizione vivevano dentro "person" (un solo
|
||||
// incarico per persona), qui normalizzate per permettere più affiliazioni.
|
||||
// legacy_user_id identifica univocamente la riga "person" d'origine (chiave
|
||||
// di upsert per l'ETL); legacy_institution_id è solo un riferimento
|
||||
// informativo, condiviso da più affiliazioni verso lo stesso ente.
|
||||
$table->unsignedBigInteger('legacy_user_id')->nullable()->unique();
|
||||
$table->unsignedBigInteger('legacy_institution_id')->nullable();
|
||||
$table->timestamps();
|
||||
$table->unique(['institution_id', 'user_id', 'is_open']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('user_affiliations');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
// Id del record nel DB legacy (v1): chiave di upsert per l'ETL e per
|
||||
// risolvere le FK delle tabelle dipendenti (come institutions.legacy_id).
|
||||
$table->unsignedBigInteger('legacy_id')->nullable()->unique()->after('id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn('legacy_id');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
// Login disabilitato (es. legacy is_active=false): blocco reversibile
|
||||
// dell'accesso, indipendente da deleted_at (cestino) e anonymized_at
|
||||
// (GDPR) — un utente disabilitato resta a tutti gli effetti nelle
|
||||
// liste/affiliazioni, solo non può autenticarsi.
|
||||
$table->timestamp('disabled_at')->nullable()->after('anonymized_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn('disabled_at');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Vocabolario delle licenze applicabili a record (artifact/model) e media.
|
||||
*
|
||||
* - `spdx_id`: identificatore SPDX ufficiale, NULL per marchi e rights
|
||||
* statement (che non stanno nella SPDX License List) — mai inventarne.
|
||||
* - `uri`: URI canonico della licenza (creativecommons.org /
|
||||
* rightsstatements.org), usato anche nel JSON-LD Linked Art.
|
||||
* - `file`: nome del testo legale in LICENSES/media/ da includere nello
|
||||
* zip di download; NULL dove un testo non esiste (mark/statement).
|
||||
* - `for_record`/`for_media`: scope della licenza, filtrano le select dei
|
||||
* form (i record ammettono solo licenze aperte, i media tutte).
|
||||
* - `active`: disattivazione soft da parte degli admin senza rompere le
|
||||
* FK dei contenuti già licenziati.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('licenses', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name', 200)->unique();
|
||||
$table->string('acronym', 50)->unique();
|
||||
$table->string('spdx_id', 50)->nullable()->unique();
|
||||
$table->string('kind', 20)->default('license');
|
||||
$table->text('description')->nullable();
|
||||
$table->string('uri', 2000)->nullable();
|
||||
$table->string('file', 512)->nullable();
|
||||
$table->boolean('for_record')->default(false);
|
||||
$table->boolean('for_media')->default(true);
|
||||
$table->unsignedInteger('sort_order')->default(0);
|
||||
$table->boolean('active')->default(true);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('licenses');
|
||||
}
|
||||
};
|
||||
@@ -20,6 +20,7 @@ class DatabaseSeeder extends Seeder
|
||||
SystemUserSeeder::class,
|
||||
InstitutionCategorySeeder::class,
|
||||
UserPositionSeeder::class,
|
||||
LicenseSeeder::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
223
backend/database/seeders/LicenseSeeder.php
Normal file
223
backend/database/seeders/LicenseSeeder.php
Normal file
@@ -0,0 +1,223 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Enums\LicenseKind;
|
||||
use App\Models\Lists\License;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
/**
|
||||
* Vocabolario delle licenze. Idempotente, gira in installazione (la tabella
|
||||
* NON è popolata dall'ETL).
|
||||
*
|
||||
* Gli id 1-3 sono FISSI e coincidono con il DB legacy (v1: 1=Public Domain,
|
||||
* 2=CC0, 3=CC BY) così l'ETL mapperà le FK di artifact/media 1:1.
|
||||
*
|
||||
* Set iniziale: famiglia Creative Commons 4.0 + Public Domain Mark + i tre
|
||||
* rights statement più comuni (InC, InC-EDU, CNE). Gli altri statement di
|
||||
* RightsStatements.org (InC-NC, NoC-NC, NKC, UND, ...) si aggiungono al
|
||||
* bisogno dal pannello admin.
|
||||
*
|
||||
* `file` è il nome del testo legale in storage/app/public/licenses/ (incluso
|
||||
* nello zip di download dei media e servito al frontend via storage:link);
|
||||
* NULL per mark e rights statement, che non hanno un testo legale. I testi CC
|
||||
* sono dedicati al pubblico dominio da Creative Commons:
|
||||
* https://creativecommons.org/policies/#license
|
||||
*/
|
||||
class LicenseSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
foreach ($this->licenses() as $id => $license) {
|
||||
License::updateOrCreate(['id' => $id], $license);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<int, array<string, mixed>>
|
||||
*/
|
||||
private function licenses(): array
|
||||
{
|
||||
return $this->openLicenses() + $this->rightsStatements();
|
||||
}
|
||||
|
||||
/**
|
||||
* Public Domain Mark + famiglia Creative Commons 4.0.
|
||||
*
|
||||
* @return array<int, array<string, mixed>>
|
||||
*/
|
||||
private function openLicenses(): array
|
||||
{
|
||||
return [
|
||||
1 => [
|
||||
'name' => 'Public Domain Mark 1.0',
|
||||
'acronym' => 'PDM 1.0',
|
||||
'spdx_id' => null,
|
||||
'kind' => LicenseKind::Mark,
|
||||
'description' => 'Marks works that are already free of known copyright worldwide (for '
|
||||
.'instance because copyright has expired). It is not a license: it declares '
|
||||
.'an existing status and grants no new permission.',
|
||||
'uri' => 'https://creativecommons.org/publicdomain/mark/1.0/',
|
||||
'file' => null,
|
||||
'for_record' => false,
|
||||
'for_media' => true,
|
||||
'sort_order' => 10,
|
||||
'active' => true,
|
||||
],
|
||||
2 => [
|
||||
'name' => 'CC0 1.0 Universal',
|
||||
'acronym' => 'CC0 1.0',
|
||||
'spdx_id' => 'CC0-1.0',
|
||||
'kind' => LicenseKind::License,
|
||||
'description' => 'Public domain dedication: the rights holder waives all copyright and '
|
||||
.'related rights worldwide. The work can be copied, modified and reused for '
|
||||
.'any purpose, even commercially, without attribution.',
|
||||
'uri' => 'https://creativecommons.org/publicdomain/zero/1.0/',
|
||||
'file' => 'CC0-1.0.txt',
|
||||
'for_record' => true,
|
||||
'for_media' => true,
|
||||
'sort_order' => 20,
|
||||
'active' => true,
|
||||
],
|
||||
3 => [
|
||||
'name' => 'Attribution 4.0 International',
|
||||
'acronym' => 'CC BY 4.0',
|
||||
'spdx_id' => 'CC-BY-4.0',
|
||||
'kind' => LicenseKind::License,
|
||||
'description' => 'Reuse, redistribution and modification allowed for any purpose, including '
|
||||
.'commercial, provided that credit is given to the creator.',
|
||||
'uri' => 'https://creativecommons.org/licenses/by/4.0/',
|
||||
'file' => 'CC-BY-4.0.txt',
|
||||
'for_record' => true,
|
||||
'for_media' => true,
|
||||
'sort_order' => 30,
|
||||
'active' => true,
|
||||
],
|
||||
4 => [
|
||||
'name' => 'Attribution-ShareAlike 4.0 International',
|
||||
'acronym' => 'CC BY-SA 4.0',
|
||||
'spdx_id' => 'CC-BY-SA-4.0',
|
||||
'kind' => LicenseKind::License,
|
||||
'description' => 'Same permissions as CC BY, but derivative works must be distributed under '
|
||||
.'the same license (share-alike).',
|
||||
'uri' => 'https://creativecommons.org/licenses/by-sa/4.0/',
|
||||
'file' => 'CC-BY-SA-4.0.txt',
|
||||
'for_record' => false,
|
||||
'for_media' => true,
|
||||
'sort_order' => 40,
|
||||
'active' => true,
|
||||
],
|
||||
5 => [
|
||||
'name' => 'Attribution-NonCommercial 4.0 International',
|
||||
'acronym' => 'CC BY-NC 4.0',
|
||||
'spdx_id' => 'CC-BY-NC-4.0',
|
||||
'kind' => LicenseKind::License,
|
||||
'description' => 'Reuse and modification allowed with attribution, for non-commercial '
|
||||
.'purposes only.',
|
||||
'uri' => 'https://creativecommons.org/licenses/by-nc/4.0/',
|
||||
'file' => 'CC-BY-NC-4.0.txt',
|
||||
'for_record' => false,
|
||||
'for_media' => true,
|
||||
'sort_order' => 50,
|
||||
'active' => true,
|
||||
],
|
||||
6 => [
|
||||
'name' => 'Attribution-NonCommercial-ShareAlike 4.0 International',
|
||||
'acronym' => 'CC BY-NC-SA 4.0',
|
||||
'spdx_id' => 'CC-BY-NC-SA-4.0',
|
||||
'kind' => LicenseKind::License,
|
||||
'description' => 'Non-commercial reuse and modification with attribution; derivative works '
|
||||
.'must keep the same license.',
|
||||
'uri' => 'https://creativecommons.org/licenses/by-nc-sa/4.0/',
|
||||
'file' => 'CC-BY-NC-SA-4.0.txt',
|
||||
'for_record' => false,
|
||||
'for_media' => true,
|
||||
'sort_order' => 60,
|
||||
'active' => true,
|
||||
],
|
||||
7 => [
|
||||
'name' => 'Attribution-NoDerivatives 4.0 International',
|
||||
'acronym' => 'CC BY-ND 4.0',
|
||||
'spdx_id' => 'CC-BY-ND-4.0',
|
||||
'kind' => LicenseKind::License,
|
||||
'description' => 'Redistribution allowed, even commercially, with attribution, but the work '
|
||||
.'must remain unmodified: no derivative works.',
|
||||
'uri' => 'https://creativecommons.org/licenses/by-nd/4.0/',
|
||||
'file' => 'CC-BY-ND-4.0.txt',
|
||||
'for_record' => false,
|
||||
'for_media' => true,
|
||||
'sort_order' => 70,
|
||||
'active' => true,
|
||||
],
|
||||
8 => [
|
||||
'name' => 'Attribution-NonCommercial-NoDerivatives 4.0 International',
|
||||
'acronym' => 'CC BY-NC-ND 4.0',
|
||||
'spdx_id' => 'CC-BY-NC-ND-4.0',
|
||||
'kind' => LicenseKind::License,
|
||||
'description' => 'The most restrictive CC license: the work can be shared with attribution, '
|
||||
.'but cannot be modified nor used commercially.',
|
||||
'uri' => 'https://creativecommons.org/licenses/by-nc-nd/4.0/',
|
||||
'file' => 'CC-BY-NC-ND-4.0.txt',
|
||||
'for_record' => false,
|
||||
'for_media' => true,
|
||||
'sort_order' => 80,
|
||||
'active' => true,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Statement di RightsStatements.org: etichettano lo stato dei diritti dei
|
||||
* media chiusi o incerti, non concedono permessi (nessun testo legale,
|
||||
* nessun id SPDX).
|
||||
*
|
||||
* @return array<int, array<string, mixed>>
|
||||
*/
|
||||
private function rightsStatements(): array
|
||||
{
|
||||
return [
|
||||
9 => [
|
||||
'name' => 'In Copyright',
|
||||
'acronym' => 'InC',
|
||||
'spdx_id' => null,
|
||||
'kind' => LicenseKind::RightsStatement,
|
||||
'description' => 'The item is protected by copyright and all rights are reserved. Any reuse '
|
||||
.'beyond legal exceptions requires permission from the rights holder.',
|
||||
'uri' => 'https://rightsstatements.org/vocab/InC/1.0/',
|
||||
'file' => null,
|
||||
'for_record' => false,
|
||||
'for_media' => true,
|
||||
'sort_order' => 90,
|
||||
'active' => true,
|
||||
],
|
||||
10 => [
|
||||
'name' => 'In Copyright - Educational Use Permitted',
|
||||
'acronym' => 'InC-EDU',
|
||||
'spdx_id' => null,
|
||||
'kind' => LicenseKind::RightsStatement,
|
||||
'description' => 'The item is protected by copyright, but the rights holder allows reuse for '
|
||||
.'educational purposes without further permission.',
|
||||
'uri' => 'https://rightsstatements.org/vocab/InC-EDU/1.0/',
|
||||
'file' => null,
|
||||
'for_record' => false,
|
||||
'for_media' => true,
|
||||
'sort_order' => 100,
|
||||
'active' => true,
|
||||
],
|
||||
11 => [
|
||||
'name' => 'Copyright Not Evaluated',
|
||||
'acronym' => 'CNE',
|
||||
'spdx_id' => null,
|
||||
'kind' => LicenseKind::RightsStatement,
|
||||
'description' => 'The copyright status of the item has not been evaluated yet. The item '
|
||||
.'should be treated as potentially protected: reuse may require permission.',
|
||||
'uri' => 'https://rightsstatements.org/vocab/CNE/1.0/',
|
||||
'file' => null,
|
||||
'for_record' => false,
|
||||
'for_media' => true,
|
||||
'sort_order' => 110,
|
||||
'active' => true,
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
24
backend/routes/api/licenses.php
Normal file
24
backend/routes/api/licenses.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\LicenseController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
// rotte pubbliche con throttling: le licenze sono informazione pubblica
|
||||
// (mostrate anche nelle pagine di dettaglio non autenticate).
|
||||
Route::middleware('throttle:public')->group(function () {
|
||||
Route::apiResource('licenses', LicenseController::class)
|
||||
->only(['index', 'show']);
|
||||
});
|
||||
|
||||
// Prefisso `api` e tier applicati dal loader in bootstrap/app.php.
|
||||
|
||||
// Lettura dello stato d'uso: utente pienamente operativo.
|
||||
Route::middleware('tier.app')->group(function () {
|
||||
Route::get('licenses/{license}/usage', [LicenseController::class, 'usage']);
|
||||
});
|
||||
|
||||
// Scrittura: solo Admin.
|
||||
Route::middleware('tier.admin')->group(function () {
|
||||
Route::apiResource('licenses', LicenseController::class)
|
||||
->only(['store', 'update', 'destroy']);
|
||||
});
|
||||
21
backend/routes/api/user-affiliations.php
Normal file
21
backend/routes/api/user-affiliations.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\UserAffiliationController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
// Prefisso `api` e stack `api` applicati dal loader in bootstrap/app.php.
|
||||
|
||||
// Lettura: pubblica con throttling.
|
||||
Route::middleware('throttle:public')->group(function () {
|
||||
Route::apiResource('user-affiliations', UserAffiliationController::class)->only(['index', 'show']);
|
||||
});
|
||||
|
||||
// Scrittura + soft delete: utente pienamente operativo (non riservata all'Admin,
|
||||
// a differenza di institutions/institution-categories).
|
||||
Route::middleware('tier.app')->group(function () {
|
||||
Route::apiResource('user-affiliations', UserAffiliationController::class)->only(['store', 'update', 'destroy']);
|
||||
|
||||
// Soft delete: ripristino e cancellazione definitiva (binding sui cestinati).
|
||||
Route::post('user-affiliations/{user_affiliation}/restore', [UserAffiliationController::class, 'restore'])->withTrashed();
|
||||
Route::delete('user-affiliations/{user_affiliation}/force', [UserAffiliationController::class, 'forceDestroy'])->withTrashed();
|
||||
});
|
||||
2
backend/storage/app/public/.gitignore
vendored
2
backend/storage/app/public/.gitignore
vendored
@@ -1,2 +1,4 @@
|
||||
*
|
||||
!licenses/
|
||||
!licenses/**
|
||||
!.gitignore
|
||||
|
||||
396
backend/storage/app/public/licenses/CC-BY-4.0.txt
Normal file
396
backend/storage/app/public/licenses/CC-BY-4.0.txt
Normal file
@@ -0,0 +1,396 @@
|
||||
Attribution 4.0 International
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
||||
does not provide legal services or legal advice. Distribution of
|
||||
Creative Commons public licenses does not create a lawyer-client or
|
||||
other relationship. Creative Commons makes its licenses and related
|
||||
information available on an "as-is" basis. Creative Commons gives no
|
||||
warranties regarding its licenses, any material licensed under their
|
||||
terms and conditions, or any related information. Creative Commons
|
||||
disclaims all liability for damages resulting from their use to the
|
||||
fullest extent possible.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and
|
||||
conditions that creators and other rights holders may use to share
|
||||
original works of authorship and other material subject to copyright
|
||||
and certain other rights specified in the public license below. The
|
||||
following considerations are for informational purposes only, are not
|
||||
exhaustive, and do not form part of our licenses.
|
||||
|
||||
Considerations for licensors: Our public licenses are
|
||||
intended for use by those authorized to give the public
|
||||
permission to use material in ways otherwise restricted by
|
||||
copyright and certain other rights. Our licenses are
|
||||
irrevocable. Licensors should read and understand the terms
|
||||
and conditions of the license they choose before applying it.
|
||||
Licensors should also secure all rights necessary before
|
||||
applying our licenses so that the public can reuse the
|
||||
material as expected. Licensors should clearly mark any
|
||||
material not subject to the license. This includes other CC-
|
||||
licensed material, or material used under an exception or
|
||||
limitation to copyright. More considerations for licensors:
|
||||
wiki.creativecommons.org/Considerations_for_licensors
|
||||
|
||||
Considerations for the public: By using one of our public
|
||||
licenses, a licensor grants the public permission to use the
|
||||
licensed material under specified terms and conditions. If
|
||||
the licensor's permission is not necessary for any reason--for
|
||||
example, because of any applicable exception or limitation to
|
||||
copyright--then that use is not regulated by the license. Our
|
||||
licenses grant only permissions under copyright and certain
|
||||
other rights that a licensor has authority to grant. Use of
|
||||
the licensed material may still be restricted for other
|
||||
reasons, including because others have copyright or other
|
||||
rights in the material. A licensor may make special requests,
|
||||
such as asking that all changes be marked or described.
|
||||
Although not required by our licenses, you are encouraged to
|
||||
respect those requests where reasonable. More considerations
|
||||
for the public:
|
||||
wiki.creativecommons.org/Considerations_for_licensees
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Attribution 4.0 International Public License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree
|
||||
to be bound by the terms and conditions of this Creative Commons
|
||||
Attribution 4.0 International Public License ("Public License"). To the
|
||||
extent this Public License may be interpreted as a contract, You are
|
||||
granted the Licensed Rights in consideration of Your acceptance of
|
||||
these terms and conditions, and the Licensor grants You such rights in
|
||||
consideration of benefits the Licensor receives from making the
|
||||
Licensed Material available under these terms and conditions.
|
||||
|
||||
|
||||
Section 1 -- Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar
|
||||
Rights that is derived from or based upon the Licensed Material
|
||||
and in which the Licensed Material is translated, altered,
|
||||
arranged, transformed, or otherwise modified in a manner requiring
|
||||
permission under the Copyright and Similar Rights held by the
|
||||
Licensor. For purposes of this Public License, where the Licensed
|
||||
Material is a musical work, performance, or sound recording,
|
||||
Adapted Material is always produced where the Licensed Material is
|
||||
synched in timed relation with a moving image.
|
||||
|
||||
b. Adapter's License means the license You apply to Your Copyright
|
||||
and Similar Rights in Your contributions to Adapted Material in
|
||||
accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. Copyright and Similar Rights means copyright and/or similar rights
|
||||
closely related to copyright including, without limitation,
|
||||
performance, broadcast, sound recording, and Sui Generis Database
|
||||
Rights, without regard to how the rights are labeled or
|
||||
categorized. For purposes of this Public License, the rights
|
||||
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||
Rights.
|
||||
|
||||
d. Effective Technological Measures means those measures that, in the
|
||||
absence of proper authority, may not be circumvented under laws
|
||||
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||
Treaty adopted on December 20, 1996, and/or similar international
|
||||
agreements.
|
||||
|
||||
e. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||
any other exception or limitation to Copyright and Similar Rights
|
||||
that applies to Your use of the Licensed Material.
|
||||
|
||||
f. Licensed Material means the artistic or literary work, database,
|
||||
or other material to which the Licensor applied this Public
|
||||
License.
|
||||
|
||||
g. Licensed Rights means the rights granted to You subject to the
|
||||
terms and conditions of this Public License, which are limited to
|
||||
all Copyright and Similar Rights that apply to Your use of the
|
||||
Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
h. Licensor means the individual(s) or entity(ies) granting rights
|
||||
under this Public License.
|
||||
|
||||
i. Share means to provide material to the public by any means or
|
||||
process that requires permission under the Licensed Rights, such
|
||||
as reproduction, public display, public performance, distribution,
|
||||
dissemination, communication, or importation, and to make material
|
||||
available to the public including in ways that members of the
|
||||
public may access the material from a place and at a time
|
||||
individually chosen by them.
|
||||
|
||||
j. Sui Generis Database Rights means rights other than copyright
|
||||
resulting from Directive 96/9/EC of the European Parliament and of
|
||||
the Council of 11 March 1996 on the legal protection of databases,
|
||||
as amended and/or succeeded, as well as other essentially
|
||||
equivalent rights anywhere in the world.
|
||||
|
||||
k. You means the individual or entity exercising the Licensed Rights
|
||||
under this Public License. Your has a corresponding meaning.
|
||||
|
||||
|
||||
Section 2 -- Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License,
|
||||
the Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to
|
||||
exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
a. reproduce and Share the Licensed Material, in whole or
|
||||
in part; and
|
||||
|
||||
b. produce, reproduce, and Share Adapted Material.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||
Exceptions and Limitations apply to Your use, this Public
|
||||
License does not apply, and You do not need to comply with
|
||||
its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section
|
||||
6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The
|
||||
Licensor authorizes You to exercise the Licensed Rights in
|
||||
all media and formats whether now known or hereafter created,
|
||||
and to make technical modifications necessary to do so. The
|
||||
Licensor waives and/or agrees not to assert any right or
|
||||
authority to forbid You from making technical modifications
|
||||
necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective
|
||||
Technological Measures. For purposes of this Public License,
|
||||
simply making modifications authorized by this Section 2(a)
|
||||
(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
a. Offer from the Licensor -- Licensed Material. Every
|
||||
recipient of the Licensed Material automatically
|
||||
receives an offer from the Licensor to exercise the
|
||||
Licensed Rights under the terms and conditions of this
|
||||
Public License.
|
||||
|
||||
b. No downstream restrictions. You may not offer or impose
|
||||
any additional or different terms or conditions on, or
|
||||
apply any Effective Technological Measures to, the
|
||||
Licensed Material if doing so restricts exercise of the
|
||||
Licensed Rights by any recipient of the Licensed
|
||||
Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or
|
||||
may be construed as permission to assert or imply that You
|
||||
are, or that Your use of the Licensed Material is, connected
|
||||
with, or sponsored, endorsed, or granted official status by,
|
||||
the Licensor or others designated to receive attribution as
|
||||
provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not
|
||||
licensed under this Public License, nor are publicity,
|
||||
privacy, and/or other similar personality rights; however, to
|
||||
the extent possible, the Licensor waives and/or agrees not to
|
||||
assert any such rights held by the Licensor to the limited
|
||||
extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this
|
||||
Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to
|
||||
collect royalties from You for the exercise of the Licensed
|
||||
Rights, whether directly or through a collecting society
|
||||
under any voluntary or waivable statutory or compulsory
|
||||
licensing scheme. In all other cases the Licensor expressly
|
||||
reserves any right to collect such royalties.
|
||||
|
||||
|
||||
Section 3 -- License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified
|
||||
form), You must:
|
||||
|
||||
a. retain the following if it is supplied by the Licensor
|
||||
with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed
|
||||
Material and any others designated to receive
|
||||
attribution, in any reasonable manner requested by
|
||||
the Licensor (including by pseudonym if
|
||||
designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of
|
||||
warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the
|
||||
extent reasonably practicable;
|
||||
|
||||
b. indicate if You modified the Licensed Material and
|
||||
retain an indication of any previous modifications; and
|
||||
|
||||
c. indicate the Licensed Material is licensed under this
|
||||
Public License, and include the text of, or the URI or
|
||||
hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||
reasonable manner based on the medium, means, and context in
|
||||
which You Share the Licensed Material. For example, it may be
|
||||
reasonable to satisfy the conditions by providing a URI or
|
||||
hyperlink to a resource that includes the required
|
||||
information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the
|
||||
information required by Section 3(a)(1)(A) to the extent
|
||||
reasonably practicable.
|
||||
|
||||
4. If You Share Adapted Material You produce, the Adapter's
|
||||
License You apply must not prevent recipients of the Adapted
|
||||
Material from complying with this Public License.
|
||||
|
||||
|
||||
Section 4 -- Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that
|
||||
apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||
to extract, reuse, reproduce, and Share all or a substantial
|
||||
portion of the contents of the database;
|
||||
|
||||
b. if You include all or a substantial portion of the database
|
||||
contents in a database in which You have Sui Generis Database
|
||||
Rights, then the database in which You have Sui Generis Database
|
||||
Rights (but not its individual contents) is Adapted Material; and
|
||||
|
||||
c. You must comply with the conditions in Section 3(a) if You Share
|
||||
all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not
|
||||
replace Your obligations under this Public License where the Licensed
|
||||
Rights include other Copyright and Similar Rights.
|
||||
|
||||
|
||||
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||
|
||||
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided
|
||||
above shall be interpreted in a manner that, to the extent
|
||||
possible, most closely approximates an absolute disclaimer and
|
||||
waiver of all liability.
|
||||
|
||||
|
||||
Section 6 -- Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and
|
||||
Similar Rights licensed here. However, if You fail to comply with
|
||||
this Public License, then Your rights under this Public License
|
||||
terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided
|
||||
it is cured within 30 days of Your discovery of the
|
||||
violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||
right the Licensor may have to seek remedies for Your violations
|
||||
of this Public License.
|
||||
|
||||
c. For the avoidance of doubt, the Licensor may also offer the
|
||||
Licensed Material under separate terms or conditions or stop
|
||||
distributing the Licensed Material at any time; however, doing so
|
||||
will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||
License.
|
||||
|
||||
|
||||
Section 7 -- Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different
|
||||
terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the
|
||||
Licensed Material not stated herein are separate from and
|
||||
independent of the terms and conditions of this Public License.
|
||||
|
||||
|
||||
Section 8 -- Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and
|
||||
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||
conditions on any use of the Licensed Material that could lawfully
|
||||
be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is
|
||||
deemed unenforceable, it shall be automatically reformed to the
|
||||
minimum extent necessary to make it enforceable. If the provision
|
||||
cannot be reformed, it shall be severed from this Public License
|
||||
without affecting the enforceability of the remaining terms and
|
||||
conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no
|
||||
failure to comply consented to unless expressly agreed to by the
|
||||
Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted
|
||||
as a limitation upon, or waiver of, any privileges and immunities
|
||||
that apply to the Licensor or You, including from the legal
|
||||
processes of any jurisdiction or authority.
|
||||
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons is not a party to its public
|
||||
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
||||
its public licenses to material it publishes and in those instances
|
||||
will be considered the “Licensor.” The text of the Creative Commons
|
||||
public licenses is dedicated to the public domain under the CC0 Public
|
||||
Domain Dedication. Except for the limited purpose of indicating that
|
||||
material is shared under a Creative Commons public license or as
|
||||
otherwise permitted by the Creative Commons policies published at
|
||||
creativecommons.org/policies, Creative Commons does not authorize the
|
||||
use of the trademark "Creative Commons" or any other trademark or logo
|
||||
of Creative Commons without its prior written consent including,
|
||||
without limitation, in connection with any unauthorized modifications
|
||||
to any of its public licenses or any other arrangements,
|
||||
understandings, or agreements concerning use of licensed material. For
|
||||
the avoidance of doubt, this paragraph does not form part of the
|
||||
public licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
||||
|
||||
408
backend/storage/app/public/licenses/CC-BY-NC-4.0.txt
Normal file
408
backend/storage/app/public/licenses/CC-BY-NC-4.0.txt
Normal file
@@ -0,0 +1,408 @@
|
||||
Attribution-NonCommercial 4.0 International
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
||||
does not provide legal services or legal advice. Distribution of
|
||||
Creative Commons public licenses does not create a lawyer-client or
|
||||
other relationship. Creative Commons makes its licenses and related
|
||||
information available on an "as-is" basis. Creative Commons gives no
|
||||
warranties regarding its licenses, any material licensed under their
|
||||
terms and conditions, or any related information. Creative Commons
|
||||
disclaims all liability for damages resulting from their use to the
|
||||
fullest extent possible.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and
|
||||
conditions that creators and other rights holders may use to share
|
||||
original works of authorship and other material subject to copyright
|
||||
and certain other rights specified in the public license below. The
|
||||
following considerations are for informational purposes only, are not
|
||||
exhaustive, and do not form part of our licenses.
|
||||
|
||||
Considerations for licensors: Our public licenses are
|
||||
intended for use by those authorized to give the public
|
||||
permission to use material in ways otherwise restricted by
|
||||
copyright and certain other rights. Our licenses are
|
||||
irrevocable. Licensors should read and understand the terms
|
||||
and conditions of the license they choose before applying it.
|
||||
Licensors should also secure all rights necessary before
|
||||
applying our licenses so that the public can reuse the
|
||||
material as expected. Licensors should clearly mark any
|
||||
material not subject to the license. This includes other CC-
|
||||
licensed material, or material used under an exception or
|
||||
limitation to copyright. More considerations for licensors:
|
||||
wiki.creativecommons.org/Considerations_for_licensors
|
||||
|
||||
Considerations for the public: By using one of our public
|
||||
licenses, a licensor grants the public permission to use the
|
||||
licensed material under specified terms and conditions. If
|
||||
the licensor's permission is not necessary for any reason--for
|
||||
example, because of any applicable exception or limitation to
|
||||
copyright--then that use is not regulated by the license. Our
|
||||
licenses grant only permissions under copyright and certain
|
||||
other rights that a licensor has authority to grant. Use of
|
||||
the licensed material may still be restricted for other
|
||||
reasons, including because others have copyright or other
|
||||
rights in the material. A licensor may make special requests,
|
||||
such as asking that all changes be marked or described.
|
||||
Although not required by our licenses, you are encouraged to
|
||||
respect those requests where reasonable. More considerations
|
||||
for the public:
|
||||
wiki.creativecommons.org/Considerations_for_licensees
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Attribution-NonCommercial 4.0 International Public
|
||||
License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree
|
||||
to be bound by the terms and conditions of this Creative Commons
|
||||
Attribution-NonCommercial 4.0 International Public License ("Public
|
||||
License"). To the extent this Public License may be interpreted as a
|
||||
contract, You are granted the Licensed Rights in consideration of Your
|
||||
acceptance of these terms and conditions, and the Licensor grants You
|
||||
such rights in consideration of benefits the Licensor receives from
|
||||
making the Licensed Material available under these terms and
|
||||
conditions.
|
||||
|
||||
|
||||
Section 1 -- Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar
|
||||
Rights that is derived from or based upon the Licensed Material
|
||||
and in which the Licensed Material is translated, altered,
|
||||
arranged, transformed, or otherwise modified in a manner requiring
|
||||
permission under the Copyright and Similar Rights held by the
|
||||
Licensor. For purposes of this Public License, where the Licensed
|
||||
Material is a musical work, performance, or sound recording,
|
||||
Adapted Material is always produced where the Licensed Material is
|
||||
synched in timed relation with a moving image.
|
||||
|
||||
b. Adapter's License means the license You apply to Your Copyright
|
||||
and Similar Rights in Your contributions to Adapted Material in
|
||||
accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. Copyright and Similar Rights means copyright and/or similar rights
|
||||
closely related to copyright including, without limitation,
|
||||
performance, broadcast, sound recording, and Sui Generis Database
|
||||
Rights, without regard to how the rights are labeled or
|
||||
categorized. For purposes of this Public License, the rights
|
||||
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||
Rights.
|
||||
d. Effective Technological Measures means those measures that, in the
|
||||
absence of proper authority, may not be circumvented under laws
|
||||
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||
Treaty adopted on December 20, 1996, and/or similar international
|
||||
agreements.
|
||||
|
||||
e. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||
any other exception or limitation to Copyright and Similar Rights
|
||||
that applies to Your use of the Licensed Material.
|
||||
|
||||
f. Licensed Material means the artistic or literary work, database,
|
||||
or other material to which the Licensor applied this Public
|
||||
License.
|
||||
|
||||
g. Licensed Rights means the rights granted to You subject to the
|
||||
terms and conditions of this Public License, which are limited to
|
||||
all Copyright and Similar Rights that apply to Your use of the
|
||||
Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
h. Licensor means the individual(s) or entity(ies) granting rights
|
||||
under this Public License.
|
||||
|
||||
i. NonCommercial means not primarily intended for or directed towards
|
||||
commercial advantage or monetary compensation. For purposes of
|
||||
this Public License, the exchange of the Licensed Material for
|
||||
other material subject to Copyright and Similar Rights by digital
|
||||
file-sharing or similar means is NonCommercial provided there is
|
||||
no payment of monetary compensation in connection with the
|
||||
exchange.
|
||||
|
||||
j. Share means to provide material to the public by any means or
|
||||
process that requires permission under the Licensed Rights, such
|
||||
as reproduction, public display, public performance, distribution,
|
||||
dissemination, communication, or importation, and to make material
|
||||
available to the public including in ways that members of the
|
||||
public may access the material from a place and at a time
|
||||
individually chosen by them.
|
||||
|
||||
k. Sui Generis Database Rights means rights other than copyright
|
||||
resulting from Directive 96/9/EC of the European Parliament and of
|
||||
the Council of 11 March 1996 on the legal protection of databases,
|
||||
as amended and/or succeeded, as well as other essentially
|
||||
equivalent rights anywhere in the world.
|
||||
|
||||
l. You means the individual or entity exercising the Licensed Rights
|
||||
under this Public License. Your has a corresponding meaning.
|
||||
|
||||
|
||||
Section 2 -- Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License,
|
||||
the Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to
|
||||
exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
a. reproduce and Share the Licensed Material, in whole or
|
||||
in part, for NonCommercial purposes only; and
|
||||
|
||||
b. produce, reproduce, and Share Adapted Material for
|
||||
NonCommercial purposes only.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||
Exceptions and Limitations apply to Your use, this Public
|
||||
License does not apply, and You do not need to comply with
|
||||
its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section
|
||||
6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The
|
||||
Licensor authorizes You to exercise the Licensed Rights in
|
||||
all media and formats whether now known or hereafter created,
|
||||
and to make technical modifications necessary to do so. The
|
||||
Licensor waives and/or agrees not to assert any right or
|
||||
authority to forbid You from making technical modifications
|
||||
necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective
|
||||
Technological Measures. For purposes of this Public License,
|
||||
simply making modifications authorized by this Section 2(a)
|
||||
(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
a. Offer from the Licensor -- Licensed Material. Every
|
||||
recipient of the Licensed Material automatically
|
||||
receives an offer from the Licensor to exercise the
|
||||
Licensed Rights under the terms and conditions of this
|
||||
Public License.
|
||||
|
||||
b. No downstream restrictions. You may not offer or impose
|
||||
any additional or different terms or conditions on, or
|
||||
apply any Effective Technological Measures to, the
|
||||
Licensed Material if doing so restricts exercise of the
|
||||
Licensed Rights by any recipient of the Licensed
|
||||
Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or
|
||||
may be construed as permission to assert or imply that You
|
||||
are, or that Your use of the Licensed Material is, connected
|
||||
with, or sponsored, endorsed, or granted official status by,
|
||||
the Licensor or others designated to receive attribution as
|
||||
provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not
|
||||
licensed under this Public License, nor are publicity,
|
||||
privacy, and/or other similar personality rights; however, to
|
||||
the extent possible, the Licensor waives and/or agrees not to
|
||||
assert any such rights held by the Licensor to the limited
|
||||
extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this
|
||||
Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to
|
||||
collect royalties from You for the exercise of the Licensed
|
||||
Rights, whether directly or through a collecting society
|
||||
under any voluntary or waivable statutory or compulsory
|
||||
licensing scheme. In all other cases the Licensor expressly
|
||||
reserves any right to collect such royalties, including when
|
||||
the Licensed Material is used other than for NonCommercial
|
||||
purposes.
|
||||
|
||||
|
||||
Section 3 -- License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified
|
||||
form), You must:
|
||||
|
||||
a. retain the following if it is supplied by the Licensor
|
||||
with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed
|
||||
Material and any others designated to receive
|
||||
attribution, in any reasonable manner requested by
|
||||
the Licensor (including by pseudonym if
|
||||
designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of
|
||||
warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the
|
||||
extent reasonably practicable;
|
||||
|
||||
b. indicate if You modified the Licensed Material and
|
||||
retain an indication of any previous modifications; and
|
||||
|
||||
c. indicate the Licensed Material is licensed under this
|
||||
Public License, and include the text of, or the URI or
|
||||
hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||
reasonable manner based on the medium, means, and context in
|
||||
which You Share the Licensed Material. For example, it may be
|
||||
reasonable to satisfy the conditions by providing a URI or
|
||||
hyperlink to a resource that includes the required
|
||||
information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the
|
||||
information required by Section 3(a)(1)(A) to the extent
|
||||
reasonably practicable.
|
||||
|
||||
4. If You Share Adapted Material You produce, the Adapter's
|
||||
License You apply must not prevent recipients of the Adapted
|
||||
Material from complying with this Public License.
|
||||
|
||||
|
||||
Section 4 -- Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that
|
||||
apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||
to extract, reuse, reproduce, and Share all or a substantial
|
||||
portion of the contents of the database for NonCommercial purposes
|
||||
only;
|
||||
|
||||
b. if You include all or a substantial portion of the database
|
||||
contents in a database in which You have Sui Generis Database
|
||||
Rights, then the database in which You have Sui Generis Database
|
||||
Rights (but not its individual contents) is Adapted Material; and
|
||||
|
||||
c. You must comply with the conditions in Section 3(a) if You Share
|
||||
all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not
|
||||
replace Your obligations under this Public License where the Licensed
|
||||
Rights include other Copyright and Similar Rights.
|
||||
|
||||
|
||||
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||
|
||||
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided
|
||||
above shall be interpreted in a manner that, to the extent
|
||||
possible, most closely approximates an absolute disclaimer and
|
||||
waiver of all liability.
|
||||
|
||||
|
||||
Section 6 -- Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and
|
||||
Similar Rights licensed here. However, if You fail to comply with
|
||||
this Public License, then Your rights under this Public License
|
||||
terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided
|
||||
it is cured within 30 days of Your discovery of the
|
||||
violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||
right the Licensor may have to seek remedies for Your violations
|
||||
of this Public License.
|
||||
|
||||
c. For the avoidance of doubt, the Licensor may also offer the
|
||||
Licensed Material under separate terms or conditions or stop
|
||||
distributing the Licensed Material at any time; however, doing so
|
||||
will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||
License.
|
||||
|
||||
|
||||
Section 7 -- Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different
|
||||
terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the
|
||||
Licensed Material not stated herein are separate from and
|
||||
independent of the terms and conditions of this Public License.
|
||||
|
||||
|
||||
Section 8 -- Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and
|
||||
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||
conditions on any use of the Licensed Material that could lawfully
|
||||
be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is
|
||||
deemed unenforceable, it shall be automatically reformed to the
|
||||
minimum extent necessary to make it enforceable. If the provision
|
||||
cannot be reformed, it shall be severed from this Public License
|
||||
without affecting the enforceability of the remaining terms and
|
||||
conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no
|
||||
failure to comply consented to unless expressly agreed to by the
|
||||
Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted
|
||||
as a limitation upon, or waiver of, any privileges and immunities
|
||||
that apply to the Licensor or You, including from the legal
|
||||
processes of any jurisdiction or authority.
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons is not a party to its public
|
||||
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
||||
its public licenses to material it publishes and in those instances
|
||||
will be considered the “Licensor.” The text of the Creative Commons
|
||||
public licenses is dedicated to the public domain under the CC0 Public
|
||||
Domain Dedication. Except for the limited purpose of indicating that
|
||||
material is shared under a Creative Commons public license or as
|
||||
otherwise permitted by the Creative Commons policies published at
|
||||
creativecommons.org/policies, Creative Commons does not authorize the
|
||||
use of the trademark "Creative Commons" or any other trademark or logo
|
||||
of Creative Commons without its prior written consent including,
|
||||
without limitation, in connection with any unauthorized modifications
|
||||
to any of its public licenses or any other arrangements,
|
||||
understandings, or agreements concerning use of licensed material. For
|
||||
the avoidance of doubt, this paragraph does not form part of the
|
||||
public licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
||||
|
||||
403
backend/storage/app/public/licenses/CC-BY-NC-ND-4.0.txt
Normal file
403
backend/storage/app/public/licenses/CC-BY-NC-ND-4.0.txt
Normal file
@@ -0,0 +1,403 @@
|
||||
Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
||||
does not provide legal services or legal advice. Distribution of
|
||||
Creative Commons public licenses does not create a lawyer-client or
|
||||
other relationship. Creative Commons makes its licenses and related
|
||||
information available on an "as-is" basis. Creative Commons gives no
|
||||
warranties regarding its licenses, any material licensed under their
|
||||
terms and conditions, or any related information. Creative Commons
|
||||
disclaims all liability for damages resulting from their use to the
|
||||
fullest extent possible.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and
|
||||
conditions that creators and other rights holders may use to share
|
||||
original works of authorship and other material subject to copyright
|
||||
and certain other rights specified in the public license below. The
|
||||
following considerations are for informational purposes only, are not
|
||||
exhaustive, and do not form part of our licenses.
|
||||
|
||||
Considerations for licensors: Our public licenses are
|
||||
intended for use by those authorized to give the public
|
||||
permission to use material in ways otherwise restricted by
|
||||
copyright and certain other rights. Our licenses are
|
||||
irrevocable. Licensors should read and understand the terms
|
||||
and conditions of the license they choose before applying it.
|
||||
Licensors should also secure all rights necessary before
|
||||
applying our licenses so that the public can reuse the
|
||||
material as expected. Licensors should clearly mark any
|
||||
material not subject to the license. This includes other CC-
|
||||
licensed material, or material used under an exception or
|
||||
limitation to copyright. More considerations for licensors:
|
||||
wiki.creativecommons.org/Considerations_for_licensors
|
||||
|
||||
Considerations for the public: By using one of our public
|
||||
licenses, a licensor grants the public permission to use the
|
||||
licensed material under specified terms and conditions. If
|
||||
the licensor's permission is not necessary for any reason--for
|
||||
example, because of any applicable exception or limitation to
|
||||
copyright--then that use is not regulated by the license. Our
|
||||
licenses grant only permissions under copyright and certain
|
||||
other rights that a licensor has authority to grant. Use of
|
||||
the licensed material may still be restricted for other
|
||||
reasons, including because others have copyright or other
|
||||
rights in the material. A licensor may make special requests,
|
||||
such as asking that all changes be marked or described.
|
||||
Although not required by our licenses, you are encouraged to
|
||||
respect those requests where reasonable. More considerations
|
||||
for the public:
|
||||
wiki.creativecommons.org/Considerations_for_licensees
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Attribution-NonCommercial-NoDerivatives 4.0
|
||||
International Public License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree
|
||||
to be bound by the terms and conditions of this Creative Commons
|
||||
Attribution-NonCommercial-NoDerivatives 4.0 International Public
|
||||
License ("Public License"). To the extent this Public License may be
|
||||
interpreted as a contract, You are granted the Licensed Rights in
|
||||
consideration of Your acceptance of these terms and conditions, and the
|
||||
Licensor grants You such rights in consideration of benefits the
|
||||
Licensor receives from making the Licensed Material available under
|
||||
these terms and conditions.
|
||||
|
||||
|
||||
Section 1 -- Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar
|
||||
Rights that is derived from or based upon the Licensed Material
|
||||
and in which the Licensed Material is translated, altered,
|
||||
arranged, transformed, or otherwise modified in a manner requiring
|
||||
permission under the Copyright and Similar Rights held by the
|
||||
Licensor. For purposes of this Public License, where the Licensed
|
||||
Material is a musical work, performance, or sound recording,
|
||||
Adapted Material is always produced where the Licensed Material is
|
||||
synched in timed relation with a moving image.
|
||||
|
||||
b. Copyright and Similar Rights means copyright and/or similar rights
|
||||
closely related to copyright including, without limitation,
|
||||
performance, broadcast, sound recording, and Sui Generis Database
|
||||
Rights, without regard to how the rights are labeled or
|
||||
categorized. For purposes of this Public License, the rights
|
||||
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||
Rights.
|
||||
|
||||
c. Effective Technological Measures means those measures that, in the
|
||||
absence of proper authority, may not be circumvented under laws
|
||||
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||
Treaty adopted on December 20, 1996, and/or similar international
|
||||
agreements.
|
||||
|
||||
d. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||
any other exception or limitation to Copyright and Similar Rights
|
||||
that applies to Your use of the Licensed Material.
|
||||
|
||||
e. Licensed Material means the artistic or literary work, database,
|
||||
or other material to which the Licensor applied this Public
|
||||
License.
|
||||
|
||||
f. Licensed Rights means the rights granted to You subject to the
|
||||
terms and conditions of this Public License, which are limited to
|
||||
all Copyright and Similar Rights that apply to Your use of the
|
||||
Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
g. Licensor means the individual(s) or entity(ies) granting rights
|
||||
under this Public License.
|
||||
|
||||
h. NonCommercial means not primarily intended for or directed towards
|
||||
commercial advantage or monetary compensation. For purposes of
|
||||
this Public License, the exchange of the Licensed Material for
|
||||
other material subject to Copyright and Similar Rights by digital
|
||||
file-sharing or similar means is NonCommercial provided there is
|
||||
no payment of monetary compensation in connection with the
|
||||
exchange.
|
||||
|
||||
i. Share means to provide material to the public by any means or
|
||||
process that requires permission under the Licensed Rights, such
|
||||
as reproduction, public display, public performance, distribution,
|
||||
dissemination, communication, or importation, and to make material
|
||||
available to the public including in ways that members of the
|
||||
public may access the material from a place and at a time
|
||||
individually chosen by them.
|
||||
|
||||
j. Sui Generis Database Rights means rights other than copyright
|
||||
resulting from Directive 96/9/EC of the European Parliament and of
|
||||
the Council of 11 March 1996 on the legal protection of databases,
|
||||
as amended and/or succeeded, as well as other essentially
|
||||
equivalent rights anywhere in the world.
|
||||
|
||||
k. You means the individual or entity exercising the Licensed Rights
|
||||
under this Public License. Your has a corresponding meaning.
|
||||
|
||||
|
||||
Section 2 -- Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License,
|
||||
the Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to
|
||||
exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
a. reproduce and Share the Licensed Material, in whole or
|
||||
in part, for NonCommercial purposes only; and
|
||||
|
||||
b. produce and reproduce, but not Share, Adapted Material
|
||||
for NonCommercial purposes only.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||
Exceptions and Limitations apply to Your use, this Public
|
||||
License does not apply, and You do not need to comply with
|
||||
its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section
|
||||
6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The
|
||||
Licensor authorizes You to exercise the Licensed Rights in
|
||||
all media and formats whether now known or hereafter created,
|
||||
and to make technical modifications necessary to do so. The
|
||||
Licensor waives and/or agrees not to assert any right or
|
||||
authority to forbid You from making technical modifications
|
||||
necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective
|
||||
Technological Measures. For purposes of this Public License,
|
||||
simply making modifications authorized by this Section 2(a)
|
||||
(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
a. Offer from the Licensor -- Licensed Material. Every
|
||||
recipient of the Licensed Material automatically
|
||||
receives an offer from the Licensor to exercise the
|
||||
Licensed Rights under the terms and conditions of this
|
||||
Public License.
|
||||
|
||||
b. No downstream restrictions. You may not offer or impose
|
||||
any additional or different terms or conditions on, or
|
||||
apply any Effective Technological Measures to, the
|
||||
Licensed Material if doing so restricts exercise of the
|
||||
Licensed Rights by any recipient of the Licensed
|
||||
Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or
|
||||
may be construed as permission to assert or imply that You
|
||||
are, or that Your use of the Licensed Material is, connected
|
||||
with, or sponsored, endorsed, or granted official status by,
|
||||
the Licensor or others designated to receive attribution as
|
||||
provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not
|
||||
licensed under this Public License, nor are publicity,
|
||||
privacy, and/or other similar personality rights; however, to
|
||||
the extent possible, the Licensor waives and/or agrees not to
|
||||
assert any such rights held by the Licensor to the limited
|
||||
extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this
|
||||
Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to
|
||||
collect royalties from You for the exercise of the Licensed
|
||||
Rights, whether directly or through a collecting society
|
||||
under any voluntary or waivable statutory or compulsory
|
||||
licensing scheme. In all other cases the Licensor expressly
|
||||
reserves any right to collect such royalties, including when
|
||||
the Licensed Material is used other than for NonCommercial
|
||||
purposes.
|
||||
|
||||
|
||||
Section 3 -- License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material, You must:
|
||||
|
||||
a. retain the following if it is supplied by the Licensor
|
||||
with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed
|
||||
Material and any others designated to receive
|
||||
attribution, in any reasonable manner requested by
|
||||
the Licensor (including by pseudonym if
|
||||
designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of
|
||||
warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the
|
||||
extent reasonably practicable;
|
||||
|
||||
b. indicate if You modified the Licensed Material and
|
||||
retain an indication of any previous modifications; and
|
||||
|
||||
c. indicate the Licensed Material is licensed under this
|
||||
Public License, and include the text of, or the URI or
|
||||
hyperlink to, this Public License.
|
||||
|
||||
For the avoidance of doubt, You do not have permission under
|
||||
this Public License to Share Adapted Material.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||
reasonable manner based on the medium, means, and context in
|
||||
which You Share the Licensed Material. For example, it may be
|
||||
reasonable to satisfy the conditions by providing a URI or
|
||||
hyperlink to a resource that includes the required
|
||||
information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the
|
||||
information required by Section 3(a)(1)(A) to the extent
|
||||
reasonably practicable.
|
||||
|
||||
|
||||
Section 4 -- Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that
|
||||
apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||
to extract, reuse, reproduce, and Share all or a substantial
|
||||
portion of the contents of the database for NonCommercial purposes
|
||||
only and provided You do not Share Adapted Material;
|
||||
|
||||
b. if You include all or a substantial portion of the database
|
||||
contents in a database in which You have Sui Generis Database
|
||||
Rights, then the database in which You have Sui Generis Database
|
||||
Rights (but not its individual contents) is Adapted Material; and
|
||||
|
||||
c. You must comply with the conditions in Section 3(a) if You Share
|
||||
all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not
|
||||
replace Your obligations under this Public License where the Licensed
|
||||
Rights include other Copyright and Similar Rights.
|
||||
|
||||
|
||||
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||
|
||||
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided
|
||||
above shall be interpreted in a manner that, to the extent
|
||||
possible, most closely approximates an absolute disclaimer and
|
||||
waiver of all liability.
|
||||
|
||||
|
||||
Section 6 -- Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and
|
||||
Similar Rights licensed here. However, if You fail to comply with
|
||||
this Public License, then Your rights under this Public License
|
||||
terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided
|
||||
it is cured within 30 days of Your discovery of the
|
||||
violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||
right the Licensor may have to seek remedies for Your violations
|
||||
of this Public License.
|
||||
|
||||
c. For the avoidance of doubt, the Licensor may also offer the
|
||||
Licensed Material under separate terms or conditions or stop
|
||||
distributing the Licensed Material at any time; however, doing so
|
||||
will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||
License.
|
||||
|
||||
|
||||
Section 7 -- Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different
|
||||
terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the
|
||||
Licensed Material not stated herein are separate from and
|
||||
independent of the terms and conditions of this Public License.
|
||||
|
||||
|
||||
Section 8 -- Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and
|
||||
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||
conditions on any use of the Licensed Material that could lawfully
|
||||
be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is
|
||||
deemed unenforceable, it shall be automatically reformed to the
|
||||
minimum extent necessary to make it enforceable. If the provision
|
||||
cannot be reformed, it shall be severed from this Public License
|
||||
without affecting the enforceability of the remaining terms and
|
||||
conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no
|
||||
failure to comply consented to unless expressly agreed to by the
|
||||
Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted
|
||||
as a limitation upon, or waiver of, any privileges and immunities
|
||||
that apply to the Licensor or You, including from the legal
|
||||
processes of any jurisdiction or authority.
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons is not a party to its public
|
||||
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
||||
its public licenses to material it publishes and in those instances
|
||||
will be considered the “Licensor.” The text of the Creative Commons
|
||||
public licenses is dedicated to the public domain under the CC0 Public
|
||||
Domain Dedication. Except for the limited purpose of indicating that
|
||||
material is shared under a Creative Commons public license or as
|
||||
otherwise permitted by the Creative Commons policies published at
|
||||
creativecommons.org/policies, Creative Commons does not authorize the
|
||||
use of the trademark "Creative Commons" or any other trademark or logo
|
||||
of Creative Commons without its prior written consent including,
|
||||
without limitation, in connection with any unauthorized modifications
|
||||
to any of its public licenses or any other arrangements,
|
||||
understandings, or agreements concerning use of licensed material. For
|
||||
the avoidance of doubt, this paragraph does not form part of the
|
||||
public licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
||||
|
||||
438
backend/storage/app/public/licenses/CC-BY-NC-SA-4.0.txt
Normal file
438
backend/storage/app/public/licenses/CC-BY-NC-SA-4.0.txt
Normal file
@@ -0,0 +1,438 @@
|
||||
Attribution-NonCommercial-ShareAlike 4.0 International
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
||||
does not provide legal services or legal advice. Distribution of
|
||||
Creative Commons public licenses does not create a lawyer-client or
|
||||
other relationship. Creative Commons makes its licenses and related
|
||||
information available on an "as-is" basis. Creative Commons gives no
|
||||
warranties regarding its licenses, any material licensed under their
|
||||
terms and conditions, or any related information. Creative Commons
|
||||
disclaims all liability for damages resulting from their use to the
|
||||
fullest extent possible.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and
|
||||
conditions that creators and other rights holders may use to share
|
||||
original works of authorship and other material subject to copyright
|
||||
and certain other rights specified in the public license below. The
|
||||
following considerations are for informational purposes only, are not
|
||||
exhaustive, and do not form part of our licenses.
|
||||
|
||||
Considerations for licensors: Our public licenses are
|
||||
intended for use by those authorized to give the public
|
||||
permission to use material in ways otherwise restricted by
|
||||
copyright and certain other rights. Our licenses are
|
||||
irrevocable. Licensors should read and understand the terms
|
||||
and conditions of the license they choose before applying it.
|
||||
Licensors should also secure all rights necessary before
|
||||
applying our licenses so that the public can reuse the
|
||||
material as expected. Licensors should clearly mark any
|
||||
material not subject to the license. This includes other CC-
|
||||
licensed material, or material used under an exception or
|
||||
limitation to copyright. More considerations for licensors:
|
||||
wiki.creativecommons.org/Considerations_for_licensors
|
||||
|
||||
Considerations for the public: By using one of our public
|
||||
licenses, a licensor grants the public permission to use the
|
||||
licensed material under specified terms and conditions. If
|
||||
the licensor's permission is not necessary for any reason--for
|
||||
example, because of any applicable exception or limitation to
|
||||
copyright--then that use is not regulated by the license. Our
|
||||
licenses grant only permissions under copyright and certain
|
||||
other rights that a licensor has authority to grant. Use of
|
||||
the licensed material may still be restricted for other
|
||||
reasons, including because others have copyright or other
|
||||
rights in the material. A licensor may make special requests,
|
||||
such as asking that all changes be marked or described.
|
||||
Although not required by our licenses, you are encouraged to
|
||||
respect those requests where reasonable. More considerations
|
||||
for the public:
|
||||
wiki.creativecommons.org/Considerations_for_licensees
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
|
||||
Public License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree
|
||||
to be bound by the terms and conditions of this Creative Commons
|
||||
Attribution-NonCommercial-ShareAlike 4.0 International Public License
|
||||
("Public License"). To the extent this Public License may be
|
||||
interpreted as a contract, You are granted the Licensed Rights in
|
||||
consideration of Your acceptance of these terms and conditions, and the
|
||||
Licensor grants You such rights in consideration of benefits the
|
||||
Licensor receives from making the Licensed Material available under
|
||||
these terms and conditions.
|
||||
|
||||
|
||||
Section 1 -- Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar
|
||||
Rights that is derived from or based upon the Licensed Material
|
||||
and in which the Licensed Material is translated, altered,
|
||||
arranged, transformed, or otherwise modified in a manner requiring
|
||||
permission under the Copyright and Similar Rights held by the
|
||||
Licensor. For purposes of this Public License, where the Licensed
|
||||
Material is a musical work, performance, or sound recording,
|
||||
Adapted Material is always produced where the Licensed Material is
|
||||
synched in timed relation with a moving image.
|
||||
|
||||
b. Adapter's License means the license You apply to Your Copyright
|
||||
and Similar Rights in Your contributions to Adapted Material in
|
||||
accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. BY-NC-SA Compatible License means a license listed at
|
||||
creativecommons.org/compatiblelicenses, approved by Creative
|
||||
Commons as essentially the equivalent of this Public License.
|
||||
|
||||
d. Copyright and Similar Rights means copyright and/or similar rights
|
||||
closely related to copyright including, without limitation,
|
||||
performance, broadcast, sound recording, and Sui Generis Database
|
||||
Rights, without regard to how the rights are labeled or
|
||||
categorized. For purposes of this Public License, the rights
|
||||
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||
Rights.
|
||||
|
||||
e. Effective Technological Measures means those measures that, in the
|
||||
absence of proper authority, may not be circumvented under laws
|
||||
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||
Treaty adopted on December 20, 1996, and/or similar international
|
||||
agreements.
|
||||
|
||||
f. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||
any other exception or limitation to Copyright and Similar Rights
|
||||
that applies to Your use of the Licensed Material.
|
||||
|
||||
g. License Elements means the license attributes listed in the name
|
||||
of a Creative Commons Public License. The License Elements of this
|
||||
Public License are Attribution, NonCommercial, and ShareAlike.
|
||||
|
||||
h. Licensed Material means the artistic or literary work, database,
|
||||
or other material to which the Licensor applied this Public
|
||||
License.
|
||||
|
||||
i. Licensed Rights means the rights granted to You subject to the
|
||||
terms and conditions of this Public License, which are limited to
|
||||
all Copyright and Similar Rights that apply to Your use of the
|
||||
Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
j. Licensor means the individual(s) or entity(ies) granting rights
|
||||
under this Public License.
|
||||
|
||||
k. NonCommercial means not primarily intended for or directed towards
|
||||
commercial advantage or monetary compensation. For purposes of
|
||||
this Public License, the exchange of the Licensed Material for
|
||||
other material subject to Copyright and Similar Rights by digital
|
||||
file-sharing or similar means is NonCommercial provided there is
|
||||
no payment of monetary compensation in connection with the
|
||||
exchange.
|
||||
|
||||
l. Share means to provide material to the public by any means or
|
||||
process that requires permission under the Licensed Rights, such
|
||||
as reproduction, public display, public performance, distribution,
|
||||
dissemination, communication, or importation, and to make material
|
||||
available to the public including in ways that members of the
|
||||
public may access the material from a place and at a time
|
||||
individually chosen by them.
|
||||
|
||||
m. Sui Generis Database Rights means rights other than copyright
|
||||
resulting from Directive 96/9/EC of the European Parliament and of
|
||||
the Council of 11 March 1996 on the legal protection of databases,
|
||||
as amended and/or succeeded, as well as other essentially
|
||||
equivalent rights anywhere in the world.
|
||||
|
||||
n. You means the individual or entity exercising the Licensed Rights
|
||||
under this Public License. Your has a corresponding meaning.
|
||||
|
||||
|
||||
Section 2 -- Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License,
|
||||
the Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to
|
||||
exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
a. reproduce and Share the Licensed Material, in whole or
|
||||
in part, for NonCommercial purposes only; and
|
||||
|
||||
b. produce, reproduce, and Share Adapted Material for
|
||||
NonCommercial purposes only.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||
Exceptions and Limitations apply to Your use, this Public
|
||||
License does not apply, and You do not need to comply with
|
||||
its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section
|
||||
6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The
|
||||
Licensor authorizes You to exercise the Licensed Rights in
|
||||
all media and formats whether now known or hereafter created,
|
||||
and to make technical modifications necessary to do so. The
|
||||
Licensor waives and/or agrees not to assert any right or
|
||||
authority to forbid You from making technical modifications
|
||||
necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective
|
||||
Technological Measures. For purposes of this Public License,
|
||||
simply making modifications authorized by this Section 2(a)
|
||||
(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
a. Offer from the Licensor -- Licensed Material. Every
|
||||
recipient of the Licensed Material automatically
|
||||
receives an offer from the Licensor to exercise the
|
||||
Licensed Rights under the terms and conditions of this
|
||||
Public License.
|
||||
|
||||
b. Additional offer from the Licensor -- Adapted Material.
|
||||
Every recipient of Adapted Material from You
|
||||
automatically receives an offer from the Licensor to
|
||||
exercise the Licensed Rights in the Adapted Material
|
||||
under the conditions of the Adapter's License You apply.
|
||||
|
||||
c. No downstream restrictions. You may not offer or impose
|
||||
any additional or different terms or conditions on, or
|
||||
apply any Effective Technological Measures to, the
|
||||
Licensed Material if doing so restricts exercise of the
|
||||
Licensed Rights by any recipient of the Licensed
|
||||
Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or
|
||||
may be construed as permission to assert or imply that You
|
||||
are, or that Your use of the Licensed Material is, connected
|
||||
with, or sponsored, endorsed, or granted official status by,
|
||||
the Licensor or others designated to receive attribution as
|
||||
provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not
|
||||
licensed under this Public License, nor are publicity,
|
||||
privacy, and/or other similar personality rights; however, to
|
||||
the extent possible, the Licensor waives and/or agrees not to
|
||||
assert any such rights held by the Licensor to the limited
|
||||
extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this
|
||||
Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to
|
||||
collect royalties from You for the exercise of the Licensed
|
||||
Rights, whether directly or through a collecting society
|
||||
under any voluntary or waivable statutory or compulsory
|
||||
licensing scheme. In all other cases the Licensor expressly
|
||||
reserves any right to collect such royalties, including when
|
||||
the Licensed Material is used other than for NonCommercial
|
||||
purposes.
|
||||
|
||||
|
||||
Section 3 -- License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified
|
||||
form), You must:
|
||||
|
||||
a. retain the following if it is supplied by the Licensor
|
||||
with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed
|
||||
Material and any others designated to receive
|
||||
attribution, in any reasonable manner requested by
|
||||
the Licensor (including by pseudonym if
|
||||
designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of
|
||||
warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the
|
||||
extent reasonably practicable;
|
||||
|
||||
b. indicate if You modified the Licensed Material and
|
||||
retain an indication of any previous modifications; and
|
||||
|
||||
c. indicate the Licensed Material is licensed under this
|
||||
Public License, and include the text of, or the URI or
|
||||
hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||
reasonable manner based on the medium, means, and context in
|
||||
which You Share the Licensed Material. For example, it may be
|
||||
reasonable to satisfy the conditions by providing a URI or
|
||||
hyperlink to a resource that includes the required
|
||||
information.
|
||||
3. If requested by the Licensor, You must remove any of the
|
||||
information required by Section 3(a)(1)(A) to the extent
|
||||
reasonably practicable.
|
||||
|
||||
b. ShareAlike.
|
||||
|
||||
In addition to the conditions in Section 3(a), if You Share
|
||||
Adapted Material You produce, the following conditions also apply.
|
||||
|
||||
1. The Adapter's License You apply must be a Creative Commons
|
||||
license with the same License Elements, this version or
|
||||
later, or a BY-NC-SA Compatible License.
|
||||
|
||||
2. You must include the text of, or the URI or hyperlink to, the
|
||||
Adapter's License You apply. You may satisfy this condition
|
||||
in any reasonable manner based on the medium, means, and
|
||||
context in which You Share Adapted Material.
|
||||
|
||||
3. You may not offer or impose any additional or different terms
|
||||
or conditions on, or apply any Effective Technological
|
||||
Measures to, Adapted Material that restrict exercise of the
|
||||
rights granted under the Adapter's License You apply.
|
||||
|
||||
|
||||
Section 4 -- Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that
|
||||
apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||
to extract, reuse, reproduce, and Share all or a substantial
|
||||
portion of the contents of the database for NonCommercial purposes
|
||||
only;
|
||||
|
||||
b. if You include all or a substantial portion of the database
|
||||
contents in a database in which You have Sui Generis Database
|
||||
Rights, then the database in which You have Sui Generis Database
|
||||
Rights (but not its individual contents) is Adapted Material,
|
||||
including for purposes of Section 3(b); and
|
||||
|
||||
c. You must comply with the conditions in Section 3(a) if You Share
|
||||
all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not
|
||||
replace Your obligations under this Public License where the Licensed
|
||||
Rights include other Copyright and Similar Rights.
|
||||
|
||||
|
||||
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||
|
||||
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided
|
||||
above shall be interpreted in a manner that, to the extent
|
||||
possible, most closely approximates an absolute disclaimer and
|
||||
waiver of all liability.
|
||||
|
||||
|
||||
Section 6 -- Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and
|
||||
Similar Rights licensed here. However, if You fail to comply with
|
||||
this Public License, then Your rights under this Public License
|
||||
terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided
|
||||
it is cured within 30 days of Your discovery of the
|
||||
violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||
right the Licensor may have to seek remedies for Your violations
|
||||
of this Public License.
|
||||
|
||||
c. For the avoidance of doubt, the Licensor may also offer the
|
||||
Licensed Material under separate terms or conditions or stop
|
||||
distributing the Licensed Material at any time; however, doing so
|
||||
will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||
License.
|
||||
|
||||
|
||||
Section 7 -- Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different
|
||||
terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the
|
||||
Licensed Material not stated herein are separate from and
|
||||
independent of the terms and conditions of this Public License.
|
||||
|
||||
|
||||
Section 8 -- Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and
|
||||
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||
conditions on any use of the Licensed Material that could lawfully
|
||||
be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is
|
||||
deemed unenforceable, it shall be automatically reformed to the
|
||||
minimum extent necessary to make it enforceable. If the provision
|
||||
cannot be reformed, it shall be severed from this Public License
|
||||
without affecting the enforceability of the remaining terms and
|
||||
conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no
|
||||
failure to comply consented to unless expressly agreed to by the
|
||||
Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted
|
||||
as a limitation upon, or waiver of, any privileges and immunities
|
||||
that apply to the Licensor or You, including from the legal
|
||||
processes of any jurisdiction or authority.
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons is not a party to its public
|
||||
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
||||
its public licenses to material it publishes and in those instances
|
||||
will be considered the “Licensor.” The text of the Creative Commons
|
||||
public licenses is dedicated to the public domain under the CC0 Public
|
||||
Domain Dedication. Except for the limited purpose of indicating that
|
||||
material is shared under a Creative Commons public license or as
|
||||
otherwise permitted by the Creative Commons policies published at
|
||||
creativecommons.org/policies, Creative Commons does not authorize the
|
||||
use of the trademark "Creative Commons" or any other trademark or logo
|
||||
of Creative Commons without its prior written consent including,
|
||||
without limitation, in connection with any unauthorized modifications
|
||||
to any of its public licenses or any other arrangements,
|
||||
understandings, or agreements concerning use of licensed material. For
|
||||
the avoidance of doubt, this paragraph does not form part of the
|
||||
public licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
||||
|
||||
393
backend/storage/app/public/licenses/CC-BY-ND-4.0.txt
Normal file
393
backend/storage/app/public/licenses/CC-BY-ND-4.0.txt
Normal file
@@ -0,0 +1,393 @@
|
||||
Attribution-NoDerivatives 4.0 International
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
||||
does not provide legal services or legal advice. Distribution of
|
||||
Creative Commons public licenses does not create a lawyer-client or
|
||||
other relationship. Creative Commons makes its licenses and related
|
||||
information available on an "as-is" basis. Creative Commons gives no
|
||||
warranties regarding its licenses, any material licensed under their
|
||||
terms and conditions, or any related information. Creative Commons
|
||||
disclaims all liability for damages resulting from their use to the
|
||||
fullest extent possible.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and
|
||||
conditions that creators and other rights holders may use to share
|
||||
original works of authorship and other material subject to copyright
|
||||
and certain other rights specified in the public license below. The
|
||||
following considerations are for informational purposes only, are not
|
||||
exhaustive, and do not form part of our licenses.
|
||||
|
||||
Considerations for licensors: Our public licenses are
|
||||
intended for use by those authorized to give the public
|
||||
permission to use material in ways otherwise restricted by
|
||||
copyright and certain other rights. Our licenses are
|
||||
irrevocable. Licensors should read and understand the terms
|
||||
and conditions of the license they choose before applying it.
|
||||
Licensors should also secure all rights necessary before
|
||||
applying our licenses so that the public can reuse the
|
||||
material as expected. Licensors should clearly mark any
|
||||
material not subject to the license. This includes other CC-
|
||||
licensed material, or material used under an exception or
|
||||
limitation to copyright. More considerations for licensors:
|
||||
wiki.creativecommons.org/Considerations_for_licensors
|
||||
|
||||
Considerations for the public: By using one of our public
|
||||
licenses, a licensor grants the public permission to use the
|
||||
licensed material under specified terms and conditions. If
|
||||
the licensor's permission is not necessary for any reason--for
|
||||
example, because of any applicable exception or limitation to
|
||||
copyright--then that use is not regulated by the license. Our
|
||||
licenses grant only permissions under copyright and certain
|
||||
other rights that a licensor has authority to grant. Use of
|
||||
the licensed material may still be restricted for other
|
||||
reasons, including because others have copyright or other
|
||||
rights in the material. A licensor may make special requests,
|
||||
such as asking that all changes be marked or described.
|
||||
Although not required by our licenses, you are encouraged to
|
||||
respect those requests where reasonable. More considerations
|
||||
for the public:
|
||||
wiki.creativecommons.org/Considerations_for_licensees
|
||||
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Attribution-NoDerivatives 4.0 International Public
|
||||
License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree
|
||||
to be bound by the terms and conditions of this Creative Commons
|
||||
Attribution-NoDerivatives 4.0 International Public License ("Public
|
||||
License"). To the extent this Public License may be interpreted as a
|
||||
contract, You are granted the Licensed Rights in consideration of Your
|
||||
acceptance of these terms and conditions, and the Licensor grants You
|
||||
such rights in consideration of benefits the Licensor receives from
|
||||
making the Licensed Material available under these terms and
|
||||
conditions.
|
||||
|
||||
|
||||
Section 1 -- Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar
|
||||
Rights that is derived from or based upon the Licensed Material
|
||||
and in which the Licensed Material is translated, altered,
|
||||
arranged, transformed, or otherwise modified in a manner requiring
|
||||
permission under the Copyright and Similar Rights held by the
|
||||
Licensor. For purposes of this Public License, where the Licensed
|
||||
Material is a musical work, performance, or sound recording,
|
||||
Adapted Material is always produced where the Licensed Material is
|
||||
synched in timed relation with a moving image.
|
||||
|
||||
b. Copyright and Similar Rights means copyright and/or similar rights
|
||||
closely related to copyright including, without limitation,
|
||||
performance, broadcast, sound recording, and Sui Generis Database
|
||||
Rights, without regard to how the rights are labeled or
|
||||
categorized. For purposes of this Public License, the rights
|
||||
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||
Rights.
|
||||
|
||||
c. Effective Technological Measures means those measures that, in the
|
||||
absence of proper authority, may not be circumvented under laws
|
||||
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||
Treaty adopted on December 20, 1996, and/or similar international
|
||||
agreements.
|
||||
|
||||
d. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||
any other exception or limitation to Copyright and Similar Rights
|
||||
that applies to Your use of the Licensed Material.
|
||||
|
||||
e. Licensed Material means the artistic or literary work, database,
|
||||
or other material to which the Licensor applied this Public
|
||||
License.
|
||||
|
||||
f. Licensed Rights means the rights granted to You subject to the
|
||||
terms and conditions of this Public License, which are limited to
|
||||
all Copyright and Similar Rights that apply to Your use of the
|
||||
Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
g. Licensor means the individual(s) or entity(ies) granting rights
|
||||
under this Public License.
|
||||
|
||||
h. Share means to provide material to the public by any means or
|
||||
process that requires permission under the Licensed Rights, such
|
||||
as reproduction, public display, public performance, distribution,
|
||||
dissemination, communication, or importation, and to make material
|
||||
available to the public including in ways that members of the
|
||||
public may access the material from a place and at a time
|
||||
individually chosen by them.
|
||||
|
||||
i. Sui Generis Database Rights means rights other than copyright
|
||||
resulting from Directive 96/9/EC of the European Parliament and of
|
||||
the Council of 11 March 1996 on the legal protection of databases,
|
||||
as amended and/or succeeded, as well as other essentially
|
||||
equivalent rights anywhere in the world.
|
||||
|
||||
j. You means the individual or entity exercising the Licensed Rights
|
||||
under this Public License. Your has a corresponding meaning.
|
||||
|
||||
|
||||
Section 2 -- Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License,
|
||||
the Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to
|
||||
exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
a. reproduce and Share the Licensed Material, in whole or
|
||||
in part; and
|
||||
|
||||
b. produce and reproduce, but not Share, Adapted Material.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||
Exceptions and Limitations apply to Your use, this Public
|
||||
License does not apply, and You do not need to comply with
|
||||
its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section
|
||||
6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The
|
||||
Licensor authorizes You to exercise the Licensed Rights in
|
||||
all media and formats whether now known or hereafter created,
|
||||
and to make technical modifications necessary to do so. The
|
||||
Licensor waives and/or agrees not to assert any right or
|
||||
authority to forbid You from making technical modifications
|
||||
necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective
|
||||
Technological Measures. For purposes of this Public License,
|
||||
simply making modifications authorized by this Section 2(a)
|
||||
(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
a. Offer from the Licensor -- Licensed Material. Every
|
||||
recipient of the Licensed Material automatically
|
||||
receives an offer from the Licensor to exercise the
|
||||
Licensed Rights under the terms and conditions of this
|
||||
Public License.
|
||||
|
||||
b. No downstream restrictions. You may not offer or impose
|
||||
any additional or different terms or conditions on, or
|
||||
apply any Effective Technological Measures to, the
|
||||
Licensed Material if doing so restricts exercise of the
|
||||
Licensed Rights by any recipient of the Licensed
|
||||
Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or
|
||||
may be construed as permission to assert or imply that You
|
||||
are, or that Your use of the Licensed Material is, connected
|
||||
with, or sponsored, endorsed, or granted official status by,
|
||||
the Licensor or others designated to receive attribution as
|
||||
provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not
|
||||
licensed under this Public License, nor are publicity,
|
||||
privacy, and/or other similar personality rights; however, to
|
||||
the extent possible, the Licensor waives and/or agrees not to
|
||||
assert any such rights held by the Licensor to the limited
|
||||
extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this
|
||||
Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to
|
||||
collect royalties from You for the exercise of the Licensed
|
||||
Rights, whether directly or through a collecting society
|
||||
under any voluntary or waivable statutory or compulsory
|
||||
licensing scheme. In all other cases the Licensor expressly
|
||||
reserves any right to collect such royalties.
|
||||
|
||||
|
||||
Section 3 -- License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material, You must:
|
||||
|
||||
a. retain the following if it is supplied by the Licensor
|
||||
with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed
|
||||
Material and any others designated to receive
|
||||
attribution, in any reasonable manner requested by
|
||||
the Licensor (including by pseudonym if
|
||||
designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of
|
||||
warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the
|
||||
extent reasonably practicable;
|
||||
|
||||
b. indicate if You modified the Licensed Material and
|
||||
retain an indication of any previous modifications; and
|
||||
|
||||
c. indicate the Licensed Material is licensed under this
|
||||
Public License, and include the text of, or the URI or
|
||||
hyperlink to, this Public License.
|
||||
|
||||
For the avoidance of doubt, You do not have permission under
|
||||
this Public License to Share Adapted Material.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||
reasonable manner based on the medium, means, and context in
|
||||
which You Share the Licensed Material. For example, it may be
|
||||
reasonable to satisfy the conditions by providing a URI or
|
||||
hyperlink to a resource that includes the required
|
||||
information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the
|
||||
information required by Section 3(a)(1)(A) to the extent
|
||||
reasonably practicable.
|
||||
|
||||
|
||||
Section 4 -- Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that
|
||||
apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||
to extract, reuse, reproduce, and Share all or a substantial
|
||||
portion of the contents of the database, provided You do not Share
|
||||
Adapted Material;
|
||||
|
||||
b. if You include all or a substantial portion of the database
|
||||
contents in a database in which You have Sui Generis Database
|
||||
Rights, then the database in which You have Sui Generis Database
|
||||
Rights (but not its individual contents) is Adapted Material; and
|
||||
|
||||
c. You must comply with the conditions in Section 3(a) if You Share
|
||||
all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not
|
||||
replace Your obligations under this Public License where the Licensed
|
||||
Rights include other Copyright and Similar Rights.
|
||||
|
||||
|
||||
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||
|
||||
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided
|
||||
above shall be interpreted in a manner that, to the extent
|
||||
possible, most closely approximates an absolute disclaimer and
|
||||
waiver of all liability.
|
||||
|
||||
|
||||
Section 6 -- Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and
|
||||
Similar Rights licensed here. However, if You fail to comply with
|
||||
this Public License, then Your rights under this Public License
|
||||
terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided
|
||||
it is cured within 30 days of Your discovery of the
|
||||
violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||
right the Licensor may have to seek remedies for Your violations
|
||||
of this Public License.
|
||||
|
||||
c. For the avoidance of doubt, the Licensor may also offer the
|
||||
Licensed Material under separate terms or conditions or stop
|
||||
distributing the Licensed Material at any time; however, doing so
|
||||
will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||
License.
|
||||
|
||||
|
||||
Section 7 -- Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different
|
||||
terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the
|
||||
Licensed Material not stated herein are separate from and
|
||||
independent of the terms and conditions of this Public License.
|
||||
|
||||
|
||||
Section 8 -- Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and
|
||||
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||
conditions on any use of the Licensed Material that could lawfully
|
||||
be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is
|
||||
deemed unenforceable, it shall be automatically reformed to the
|
||||
minimum extent necessary to make it enforceable. If the provision
|
||||
cannot be reformed, it shall be severed from this Public License
|
||||
without affecting the enforceability of the remaining terms and
|
||||
conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no
|
||||
failure to comply consented to unless expressly agreed to by the
|
||||
Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted
|
||||
as a limitation upon, or waiver of, any privileges and immunities
|
||||
that apply to the Licensor or You, including from the legal
|
||||
processes of any jurisdiction or authority.
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons is not a party to its public
|
||||
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
||||
its public licenses to material it publishes and in those instances
|
||||
will be considered the “Licensor.” The text of the Creative Commons
|
||||
public licenses is dedicated to the public domain under the CC0 Public
|
||||
Domain Dedication. Except for the limited purpose of indicating that
|
||||
material is shared under a Creative Commons public license or as
|
||||
otherwise permitted by the Creative Commons policies published at
|
||||
creativecommons.org/policies, Creative Commons does not authorize the
|
||||
use of the trademark "Creative Commons" or any other trademark or logo
|
||||
of Creative Commons without its prior written consent including,
|
||||
without limitation, in connection with any unauthorized modifications
|
||||
to any of its public licenses or any other arrangements,
|
||||
understandings, or agreements concerning use of licensed material. For
|
||||
the avoidance of doubt, this paragraph does not form part of the
|
||||
public licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
||||
|
||||
428
backend/storage/app/public/licenses/CC-BY-SA-4.0.txt
Normal file
428
backend/storage/app/public/licenses/CC-BY-SA-4.0.txt
Normal file
@@ -0,0 +1,428 @@
|
||||
Attribution-ShareAlike 4.0 International
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
||||
does not provide legal services or legal advice. Distribution of
|
||||
Creative Commons public licenses does not create a lawyer-client or
|
||||
other relationship. Creative Commons makes its licenses and related
|
||||
information available on an "as-is" basis. Creative Commons gives no
|
||||
warranties regarding its licenses, any material licensed under their
|
||||
terms and conditions, or any related information. Creative Commons
|
||||
disclaims all liability for damages resulting from their use to the
|
||||
fullest extent possible.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and
|
||||
conditions that creators and other rights holders may use to share
|
||||
original works of authorship and other material subject to copyright
|
||||
and certain other rights specified in the public license below. The
|
||||
following considerations are for informational purposes only, are not
|
||||
exhaustive, and do not form part of our licenses.
|
||||
|
||||
Considerations for licensors: Our public licenses are
|
||||
intended for use by those authorized to give the public
|
||||
permission to use material in ways otherwise restricted by
|
||||
copyright and certain other rights. Our licenses are
|
||||
irrevocable. Licensors should read and understand the terms
|
||||
and conditions of the license they choose before applying it.
|
||||
Licensors should also secure all rights necessary before
|
||||
applying our licenses so that the public can reuse the
|
||||
material as expected. Licensors should clearly mark any
|
||||
material not subject to the license. This includes other CC-
|
||||
licensed material, or material used under an exception or
|
||||
limitation to copyright. More considerations for licensors:
|
||||
wiki.creativecommons.org/Considerations_for_licensors
|
||||
|
||||
Considerations for the public: By using one of our public
|
||||
licenses, a licensor grants the public permission to use the
|
||||
licensed material under specified terms and conditions. If
|
||||
the licensor's permission is not necessary for any reason--for
|
||||
example, because of any applicable exception or limitation to
|
||||
copyright--then that use is not regulated by the license. Our
|
||||
licenses grant only permissions under copyright and certain
|
||||
other rights that a licensor has authority to grant. Use of
|
||||
the licensed material may still be restricted for other
|
||||
reasons, including because others have copyright or other
|
||||
rights in the material. A licensor may make special requests,
|
||||
such as asking that all changes be marked or described.
|
||||
Although not required by our licenses, you are encouraged to
|
||||
respect those requests where reasonable. More considerations
|
||||
for the public:
|
||||
wiki.creativecommons.org/Considerations_for_licensees
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Attribution-ShareAlike 4.0 International Public
|
||||
License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree
|
||||
to be bound by the terms and conditions of this Creative Commons
|
||||
Attribution-ShareAlike 4.0 International Public License ("Public
|
||||
License"). To the extent this Public License may be interpreted as a
|
||||
contract, You are granted the Licensed Rights in consideration of Your
|
||||
acceptance of these terms and conditions, and the Licensor grants You
|
||||
such rights in consideration of benefits the Licensor receives from
|
||||
making the Licensed Material available under these terms and
|
||||
conditions.
|
||||
|
||||
|
||||
Section 1 -- Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar
|
||||
Rights that is derived from or based upon the Licensed Material
|
||||
and in which the Licensed Material is translated, altered,
|
||||
arranged, transformed, or otherwise modified in a manner requiring
|
||||
permission under the Copyright and Similar Rights held by the
|
||||
Licensor. For purposes of this Public License, where the Licensed
|
||||
Material is a musical work, performance, or sound recording,
|
||||
Adapted Material is always produced where the Licensed Material is
|
||||
synched in timed relation with a moving image.
|
||||
|
||||
b. Adapter's License means the license You apply to Your Copyright
|
||||
and Similar Rights in Your contributions to Adapted Material in
|
||||
accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. BY-SA Compatible License means a license listed at
|
||||
creativecommons.org/compatiblelicenses, approved by Creative
|
||||
Commons as essentially the equivalent of this Public License.
|
||||
|
||||
d. Copyright and Similar Rights means copyright and/or similar rights
|
||||
closely related to copyright including, without limitation,
|
||||
performance, broadcast, sound recording, and Sui Generis Database
|
||||
Rights, without regard to how the rights are labeled or
|
||||
categorized. For purposes of this Public License, the rights
|
||||
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||
Rights.
|
||||
|
||||
e. Effective Technological Measures means those measures that, in the
|
||||
absence of proper authority, may not be circumvented under laws
|
||||
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||
Treaty adopted on December 20, 1996, and/or similar international
|
||||
agreements.
|
||||
|
||||
f. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||
any other exception or limitation to Copyright and Similar Rights
|
||||
that applies to Your use of the Licensed Material.
|
||||
|
||||
g. License Elements means the license attributes listed in the name
|
||||
of a Creative Commons Public License. The License Elements of this
|
||||
Public License are Attribution and ShareAlike.
|
||||
|
||||
h. Licensed Material means the artistic or literary work, database,
|
||||
or other material to which the Licensor applied this Public
|
||||
License.
|
||||
|
||||
i. Licensed Rights means the rights granted to You subject to the
|
||||
terms and conditions of this Public License, which are limited to
|
||||
all Copyright and Similar Rights that apply to Your use of the
|
||||
Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
j. Licensor means the individual(s) or entity(ies) granting rights
|
||||
under this Public License.
|
||||
|
||||
k. Share means to provide material to the public by any means or
|
||||
process that requires permission under the Licensed Rights, such
|
||||
as reproduction, public display, public performance, distribution,
|
||||
dissemination, communication, or importation, and to make material
|
||||
available to the public including in ways that members of the
|
||||
public may access the material from a place and at a time
|
||||
individually chosen by them.
|
||||
|
||||
l. Sui Generis Database Rights means rights other than copyright
|
||||
resulting from Directive 96/9/EC of the European Parliament and of
|
||||
the Council of 11 March 1996 on the legal protection of databases,
|
||||
as amended and/or succeeded, as well as other essentially
|
||||
equivalent rights anywhere in the world.
|
||||
|
||||
m. You means the individual or entity exercising the Licensed Rights
|
||||
under this Public License. Your has a corresponding meaning.
|
||||
|
||||
|
||||
Section 2 -- Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License,
|
||||
the Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to
|
||||
exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
a. reproduce and Share the Licensed Material, in whole or
|
||||
in part; and
|
||||
|
||||
b. produce, reproduce, and Share Adapted Material.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||
Exceptions and Limitations apply to Your use, this Public
|
||||
License does not apply, and You do not need to comply with
|
||||
its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section
|
||||
6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The
|
||||
Licensor authorizes You to exercise the Licensed Rights in
|
||||
all media and formats whether now known or hereafter created,
|
||||
and to make technical modifications necessary to do so. The
|
||||
Licensor waives and/or agrees not to assert any right or
|
||||
authority to forbid You from making technical modifications
|
||||
necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective
|
||||
Technological Measures. For purposes of this Public License,
|
||||
simply making modifications authorized by this Section 2(a)
|
||||
(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
a. Offer from the Licensor -- Licensed Material. Every
|
||||
recipient of the Licensed Material automatically
|
||||
receives an offer from the Licensor to exercise the
|
||||
Licensed Rights under the terms and conditions of this
|
||||
Public License.
|
||||
|
||||
b. Additional offer from the Licensor -- Adapted Material.
|
||||
Every recipient of Adapted Material from You
|
||||
automatically receives an offer from the Licensor to
|
||||
exercise the Licensed Rights in the Adapted Material
|
||||
under the conditions of the Adapter's License You apply.
|
||||
|
||||
c. No downstream restrictions. You may not offer or impose
|
||||
any additional or different terms or conditions on, or
|
||||
apply any Effective Technological Measures to, the
|
||||
Licensed Material if doing so restricts exercise of the
|
||||
Licensed Rights by any recipient of the Licensed
|
||||
Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or
|
||||
may be construed as permission to assert or imply that You
|
||||
are, or that Your use of the Licensed Material is, connected
|
||||
with, or sponsored, endorsed, or granted official status by,
|
||||
the Licensor or others designated to receive attribution as
|
||||
provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not
|
||||
licensed under this Public License, nor are publicity,
|
||||
privacy, and/or other similar personality rights; however, to
|
||||
the extent possible, the Licensor waives and/or agrees not to
|
||||
assert any such rights held by the Licensor to the limited
|
||||
extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this
|
||||
Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to
|
||||
collect royalties from You for the exercise of the Licensed
|
||||
Rights, whether directly or through a collecting society
|
||||
under any voluntary or waivable statutory or compulsory
|
||||
licensing scheme. In all other cases the Licensor expressly
|
||||
reserves any right to collect such royalties.
|
||||
|
||||
|
||||
Section 3 -- License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified
|
||||
form), You must:
|
||||
|
||||
a. retain the following if it is supplied by the Licensor
|
||||
with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed
|
||||
Material and any others designated to receive
|
||||
attribution, in any reasonable manner requested by
|
||||
the Licensor (including by pseudonym if
|
||||
designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of
|
||||
warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the
|
||||
extent reasonably practicable;
|
||||
|
||||
b. indicate if You modified the Licensed Material and
|
||||
retain an indication of any previous modifications; and
|
||||
|
||||
c. indicate the Licensed Material is licensed under this
|
||||
Public License, and include the text of, or the URI or
|
||||
hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||
reasonable manner based on the medium, means, and context in
|
||||
which You Share the Licensed Material. For example, it may be
|
||||
reasonable to satisfy the conditions by providing a URI or
|
||||
hyperlink to a resource that includes the required
|
||||
information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the
|
||||
information required by Section 3(a)(1)(A) to the extent
|
||||
reasonably practicable.
|
||||
|
||||
b. ShareAlike.
|
||||
|
||||
In addition to the conditions in Section 3(a), if You Share
|
||||
Adapted Material You produce, the following conditions also apply.
|
||||
|
||||
1. The Adapter's License You apply must be a Creative Commons
|
||||
license with the same License Elements, this version or
|
||||
later, or a BY-SA Compatible License.
|
||||
|
||||
2. You must include the text of, or the URI or hyperlink to, the
|
||||
Adapter's License You apply. You may satisfy this condition
|
||||
in any reasonable manner based on the medium, means, and
|
||||
context in which You Share Adapted Material.
|
||||
|
||||
3. You may not offer or impose any additional or different terms
|
||||
or conditions on, or apply any Effective Technological
|
||||
Measures to, Adapted Material that restrict exercise of the
|
||||
rights granted under the Adapter's License You apply.
|
||||
|
||||
|
||||
Section 4 -- Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that
|
||||
apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||
to extract, reuse, reproduce, and Share all or a substantial
|
||||
portion of the contents of the database;
|
||||
|
||||
b. if You include all or a substantial portion of the database
|
||||
contents in a database in which You have Sui Generis Database
|
||||
Rights, then the database in which You have Sui Generis Database
|
||||
Rights (but not its individual contents) is Adapted Material,
|
||||
including for purposes of Section 3(b); and
|
||||
|
||||
c. You must comply with the conditions in Section 3(a) if You Share
|
||||
all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not
|
||||
replace Your obligations under this Public License where the Licensed
|
||||
Rights include other Copyright and Similar Rights.
|
||||
|
||||
|
||||
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||
|
||||
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided
|
||||
above shall be interpreted in a manner that, to the extent
|
||||
possible, most closely approximates an absolute disclaimer and
|
||||
waiver of all liability.
|
||||
|
||||
|
||||
Section 6 -- Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and
|
||||
Similar Rights licensed here. However, if You fail to comply with
|
||||
this Public License, then Your rights under this Public License
|
||||
terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided
|
||||
it is cured within 30 days of Your discovery of the
|
||||
violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||
right the Licensor may have to seek remedies for Your violations
|
||||
of this Public License.
|
||||
|
||||
c. For the avoidance of doubt, the Licensor may also offer the
|
||||
Licensed Material under separate terms or conditions or stop
|
||||
distributing the Licensed Material at any time; however, doing so
|
||||
will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||
License.
|
||||
|
||||
|
||||
Section 7 -- Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different
|
||||
terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the
|
||||
Licensed Material not stated herein are separate from and
|
||||
independent of the terms and conditions of this Public License.
|
||||
|
||||
|
||||
Section 8 -- Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and
|
||||
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||
conditions on any use of the Licensed Material that could lawfully
|
||||
be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is
|
||||
deemed unenforceable, it shall be automatically reformed to the
|
||||
minimum extent necessary to make it enforceable. If the provision
|
||||
cannot be reformed, it shall be severed from this Public License
|
||||
without affecting the enforceability of the remaining terms and
|
||||
conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no
|
||||
failure to comply consented to unless expressly agreed to by the
|
||||
Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted
|
||||
as a limitation upon, or waiver of, any privileges and immunities
|
||||
that apply to the Licensor or You, including from the legal
|
||||
processes of any jurisdiction or authority.
|
||||
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons is not a party to its public
|
||||
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
||||
its public licenses to material it publishes and in those instances
|
||||
will be considered the “Licensor.” The text of the Creative Commons
|
||||
public licenses is dedicated to the public domain under the CC0 Public
|
||||
Domain Dedication. Except for the limited purpose of indicating that
|
||||
material is shared under a Creative Commons public license or as
|
||||
otherwise permitted by the Creative Commons policies published at
|
||||
creativecommons.org/policies, Creative Commons does not authorize the
|
||||
use of the trademark "Creative Commons" or any other trademark or logo
|
||||
of Creative Commons without its prior written consent including,
|
||||
without limitation, in connection with any unauthorized modifications
|
||||
to any of its public licenses or any other arrangements,
|
||||
understandings, or agreements concerning use of licensed material. For
|
||||
the avoidance of doubt, this paragraph does not form part of the
|
||||
public licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
||||
|
||||
121
backend/storage/app/public/licenses/CC0-1.0.txt
Normal file
121
backend/storage/app/public/licenses/CC0-1.0.txt
Normal file
@@ -0,0 +1,121 @@
|
||||
Creative Commons Legal Code
|
||||
|
||||
CC0 1.0 Universal
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||
HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer
|
||||
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||
authorship and/or a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for
|
||||
the purpose of contributing to a commons of creative, cultural and
|
||||
scientific works ("Commons") that the public can reliably and without fear
|
||||
of later claims of infringement build upon, modify, incorporate in other
|
||||
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||
and for any purposes, including without limitation commercial purposes.
|
||||
These owners may contribute to the Commons to promote the ideal of a free
|
||||
culture and the further production of creative, cultural and scientific
|
||||
works, or to gain reputation or greater distribution for their Work in
|
||||
part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any
|
||||
expectation of additional consideration or compensation, the person
|
||||
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||
protected by copyright and related or neighboring rights ("Copyright and
|
||||
Related Rights"). Copyright and Related Rights include, but are not
|
||||
limited to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display,
|
||||
communicate, and translate a Work;
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
iii. publicity and privacy rights pertaining to a person's image or
|
||||
likeness depicted in a Work;
|
||||
iv. rights protecting against unfair competition in regards to a Work,
|
||||
subject to the limitations in paragraph 4(a), below;
|
||||
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||
in a Work;
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal
|
||||
protection of databases, and under any national implementation
|
||||
thereof, including any amended or successor version of such
|
||||
directive); and
|
||||
vii. other similar, equivalent or corresponding rights throughout the
|
||||
world based on applicable law or treaty, and any national
|
||||
implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||
of action, whether now known or unknown (including existing as well as
|
||||
future claims and causes of action), in the Work (i) in all territories
|
||||
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||
treaty (including future time extensions), (iii) in any current or future
|
||||
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||
including without limitation commercial, advertising or promotional
|
||||
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||
member of the public at large and to the detriment of Affirmer's heirs and
|
||||
successors, fully intending that such Waiver shall not be subject to
|
||||
revocation, rescission, cancellation, termination, or any other legal or
|
||||
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||
as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||
be judged legally invalid or ineffective under applicable law, then the
|
||||
Waiver shall be preserved to the maximum extent permitted taking into
|
||||
account Affirmer's express Statement of Purpose. In addition, to the
|
||||
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||
maximum duration provided by applicable law or treaty (including future
|
||||
time extensions), (iii) in any current or future medium and for any number
|
||||
of copies, and (iv) for any purpose whatsoever, including without
|
||||
limitation commercial, advertising or promotional purposes (the
|
||||
"License"). The License shall be deemed effective as of the date CC0 was
|
||||
applied by Affirmer to the Work. Should any part of the License for any
|
||||
reason be judged legally invalid or ineffective under applicable law, such
|
||||
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||
of the License, and in such case Affirmer hereby affirms that he or she
|
||||
will not (i) exercise any of his or her remaining Copyright and Related
|
||||
Rights in the Work or (ii) assert any associated claims and causes of
|
||||
action with respect to the Work, in either case contrary to Affirmer's
|
||||
express Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||
surrendered, licensed or otherwise affected by this document.
|
||||
b. Affirmer offers the Work as-is and makes no representations or
|
||||
warranties of any kind concerning the Work, express, implied,
|
||||
statutory or otherwise, including without limitation warranties of
|
||||
title, merchantability, fitness for a particular purpose, non
|
||||
infringement, or the absence of latent or other defects, accuracy, or
|
||||
the present or absence of errors, whether or not discoverable, all to
|
||||
the greatest extent permissible under applicable law.
|
||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without
|
||||
limitation any person's Copyright and Related Rights in the Work.
|
||||
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||
consents, permissions or other rights required for any use of the
|
||||
Work.
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||
party to this document and has no duty or obligation with respect to
|
||||
this CC0 or use of the Work.
|
||||
53
backend/tests/Feature/Auth/LoginTest.php
Normal file
53
backend/tests/Feature/Auth/LoginTest.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Auth;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Tests\TestCase;
|
||||
|
||||
/**
|
||||
* Verifica il gate di login custom (`App\Actions\Fortify\AuthenticateUser`),
|
||||
* registrato via `Fortify::authenticateUsing()`.
|
||||
*/
|
||||
class LoginTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_login_succeeds_with_valid_credentials(): void
|
||||
{
|
||||
$user = $this->operationalUser();
|
||||
|
||||
$this->postJson('/api/login', [
|
||||
'email' => $user->email,
|
||||
'password' => 'password',
|
||||
])->assertOk()->assertJsonPath('two_factor', false);
|
||||
|
||||
$this->assertTrue(Auth::check());
|
||||
$this->assertSame($user->id, Auth::id());
|
||||
}
|
||||
|
||||
public function test_login_fails_with_wrong_password(): void
|
||||
{
|
||||
$user = $this->operationalUser();
|
||||
|
||||
$this->postJson('/api/login', [
|
||||
'email' => $user->email,
|
||||
'password' => 'wrong-password',
|
||||
])->assertUnprocessable();
|
||||
|
||||
$this->assertFalse(Auth::check());
|
||||
}
|
||||
|
||||
public function test_login_fails_for_disabled_user(): void
|
||||
{
|
||||
$user = $this->operationalUser(['disabled_at' => now()]);
|
||||
|
||||
$this->postJson('/api/login', [
|
||||
'email' => $user->email,
|
||||
'password' => 'password',
|
||||
])->assertUnprocessable();
|
||||
|
||||
$this->assertFalse(Auth::check());
|
||||
}
|
||||
}
|
||||
177
backend/tests/Feature/LicenseControllerTest.php
Normal file
177
backend/tests/Feature/LicenseControllerTest.php
Normal file
@@ -0,0 +1,177 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Models\Lists\License;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class LicenseControllerTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
// --- Lettura (pubblica) ---------------------------------------------------
|
||||
|
||||
public function test_index_is_public_and_ordered_by_sort_order(): void
|
||||
{
|
||||
License::factory()->create(['acronym' => 'LAST', 'sort_order' => 90]);
|
||||
License::factory()->create(['acronym' => 'FIRST', 'sort_order' => 10]);
|
||||
|
||||
$this->getJson('/api/licenses')
|
||||
->assertOk()
|
||||
->assertJsonCount(2, 'data')
|
||||
->assertJsonPath('data.0.acronym', 'FIRST')
|
||||
->assertJsonPath('data.1.acronym', 'LAST');
|
||||
}
|
||||
|
||||
public function test_index_filters_by_record_scope(): void
|
||||
{
|
||||
License::factory()->count(2)->create();
|
||||
$open = License::factory()->forRecord()->create();
|
||||
|
||||
$this->getJson('/api/licenses?scope=record')
|
||||
->assertOk()
|
||||
->assertJsonCount(1, 'data')
|
||||
->assertJsonPath('data.0.id', $open->id);
|
||||
}
|
||||
|
||||
public function test_index_filters_by_media_scope(): void
|
||||
{
|
||||
License::factory()->create(['for_media' => false, 'for_record' => true]);
|
||||
$media = License::factory()->create();
|
||||
|
||||
$this->getJson('/api/licenses?scope=media')
|
||||
->assertOk()
|
||||
->assertJsonCount(1, 'data')
|
||||
->assertJsonPath('data.0.id', $media->id);
|
||||
}
|
||||
|
||||
public function test_index_filters_by_active(): void
|
||||
{
|
||||
License::factory()->inactive()->create();
|
||||
$active = License::factory()->create();
|
||||
|
||||
$this->getJson('/api/licenses?active=1')
|
||||
->assertOk()
|
||||
->assertJsonCount(1, 'data')
|
||||
->assertJsonPath('data.0.id', $active->id);
|
||||
}
|
||||
|
||||
public function test_index_rejects_an_unknown_scope(): void
|
||||
{
|
||||
$this->getJson('/api/licenses?scope=banana')
|
||||
->assertStatus(422)
|
||||
->assertJsonValidationErrors('scope');
|
||||
}
|
||||
|
||||
public function test_show_is_public(): void
|
||||
{
|
||||
$license = License::factory()->create();
|
||||
|
||||
$this->getJson("/api/licenses/{$license->id}")
|
||||
->assertOk()
|
||||
->assertJsonPath('data.id', $license->id)
|
||||
->assertJsonStructure(['data' => [
|
||||
'id', 'name', 'acronym', 'spdx_id', 'kind', 'description',
|
||||
'uri', 'file', 'for_record', 'for_media', 'sort_order', 'active',
|
||||
]]);
|
||||
}
|
||||
|
||||
// --- Stato d'uso (tier.app) ------------------------------------------------
|
||||
|
||||
public function test_usage_requires_authentication(): void
|
||||
{
|
||||
$license = License::factory()->create();
|
||||
|
||||
$this->getJson("/api/licenses/{$license->id}/usage")->assertUnauthorized();
|
||||
}
|
||||
|
||||
public function test_usage_reports_an_unreferenced_license_as_free(): void
|
||||
{
|
||||
$this->actingAs($this->operationalUser(), 'sanctum');
|
||||
$license = License::factory()->create();
|
||||
|
||||
$this->getJson("/api/licenses/{$license->id}/usage")
|
||||
->assertOk()
|
||||
->assertJsonPath('in_use', false);
|
||||
}
|
||||
|
||||
// --- Scrittura (tier.admin) -------------------------------------------------
|
||||
|
||||
public function test_admin_can_create_a_license(): void
|
||||
{
|
||||
$this->actingAs($this->adminUser(), 'sanctum');
|
||||
|
||||
$this->postJson('/api/licenses', [
|
||||
'name' => 'In Copyright - Non-Commercial Use Permitted',
|
||||
'acronym' => 'InC-NC',
|
||||
'kind' => 'rights_statement',
|
||||
'description' => 'Copyrighted, but non-commercial use is permitted.',
|
||||
'uri' => 'http://rightsstatements.org/vocab/InC-NC/1.0/',
|
||||
])
|
||||
->assertCreated()
|
||||
->assertJsonPath('data.acronym', 'InC-NC');
|
||||
|
||||
$this->assertDatabaseHas('licenses', ['acronym' => 'InC-NC', 'kind' => 'rights_statement']);
|
||||
}
|
||||
|
||||
public function test_create_rejects_a_duplicate_acronym(): void
|
||||
{
|
||||
$this->actingAs($this->adminUser(), 'sanctum');
|
||||
License::factory()->create(['acronym' => 'CC BY 4.0']);
|
||||
|
||||
$this->postJson('/api/licenses', [
|
||||
'name' => 'Attribution 4.0 International',
|
||||
'acronym' => 'CC BY 4.0',
|
||||
'kind' => 'license',
|
||||
])
|
||||
->assertStatus(422)
|
||||
->assertJsonValidationErrors('acronym');
|
||||
}
|
||||
|
||||
public function test_create_rejects_an_unknown_kind(): void
|
||||
{
|
||||
$this->actingAs($this->adminUser(), 'sanctum');
|
||||
|
||||
$this->postJson('/api/licenses', [
|
||||
'name' => 'Some License',
|
||||
'acronym' => 'SL',
|
||||
'kind' => 'banana',
|
||||
])
|
||||
->assertStatus(422)
|
||||
->assertJsonValidationErrors('kind');
|
||||
}
|
||||
|
||||
public function test_admin_can_retire_a_license_with_a_partial_update(): void
|
||||
{
|
||||
$this->actingAs($this->adminUser(), 'sanctum');
|
||||
$license = License::factory()->create();
|
||||
|
||||
$this->patchJson("/api/licenses/{$license->id}", ['active' => false])
|
||||
->assertOk()
|
||||
->assertJsonPath('data.active', false);
|
||||
|
||||
$this->assertSame($license->acronym, $license->fresh()->acronym);
|
||||
}
|
||||
|
||||
public function test_admin_can_delete_an_unused_license(): void
|
||||
{
|
||||
$this->actingAs($this->adminUser(), 'sanctum');
|
||||
$license = License::factory()->create();
|
||||
|
||||
$this->deleteJson("/api/licenses/{$license->id}")->assertOk();
|
||||
|
||||
$this->assertDatabaseMissing('licenses', ['id' => $license->id]);
|
||||
}
|
||||
|
||||
public function test_a_non_admin_cannot_write(): void
|
||||
{
|
||||
$this->actingAs($this->operationalUser(), 'sanctum');
|
||||
$license = License::factory()->create();
|
||||
|
||||
$this->postJson('/api/licenses', ['name' => 'X', 'acronym' => 'X', 'kind' => 'license'])
|
||||
->assertForbidden();
|
||||
$this->patchJson("/api/licenses/{$license->id}", ['active' => false])->assertForbidden();
|
||||
$this->deleteJson("/api/licenses/{$license->id}")->assertForbidden();
|
||||
}
|
||||
}
|
||||
107
backend/tests/Feature/LicenseSeederTest.php
Normal file
107
backend/tests/Feature/LicenseSeederTest.php
Normal file
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Enums\LicenseKind;
|
||||
use App\Models\Lists\License;
|
||||
use Database\Seeders\DatabaseSeeder;
|
||||
use Database\Seeders\LicenseSeeder;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class LicenseSeederTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_it_seeds_the_initial_license_set(): void
|
||||
{
|
||||
$this->seed(LicenseSeeder::class);
|
||||
|
||||
$this->assertSame(11, License::count());
|
||||
}
|
||||
|
||||
public function test_legacy_ids_are_fixed_for_the_etl(): void
|
||||
{
|
||||
$this->seed(LicenseSeeder::class);
|
||||
|
||||
// v1: 1=Public Domain, 2=CC0, 3=CC BY — l'ETL mappa le FK 1:1.
|
||||
$this->assertSame('PDM 1.0', License::find(1)?->acronym);
|
||||
$this->assertSame('CC0 1.0', License::find(2)?->acronym);
|
||||
$this->assertSame('CC BY 4.0', License::find(3)?->acronym);
|
||||
}
|
||||
|
||||
public function test_only_open_licenses_are_allowed_for_records(): void
|
||||
{
|
||||
$this->seed(LicenseSeeder::class);
|
||||
|
||||
$this->assertEqualsCanonicalizing(
|
||||
['CC0-1.0', 'CC-BY-4.0'],
|
||||
License::forRecord()->pluck('spdx_id')->all()
|
||||
);
|
||||
}
|
||||
|
||||
public function test_every_license_is_available_for_media(): void
|
||||
{
|
||||
$this->seed(LicenseSeeder::class);
|
||||
|
||||
$this->assertSame(11, License::forMedia()->count());
|
||||
$this->assertSame(11, License::active()->count());
|
||||
}
|
||||
|
||||
public function test_marks_and_rights_statements_have_no_spdx_id_and_no_file(): void
|
||||
{
|
||||
$this->seed(LicenseSeeder::class);
|
||||
|
||||
License::where('kind', '!=', LicenseKind::License)->get()->each(function (License $license): void {
|
||||
$this->assertNull($license->spdx_id, "{$license->acronym} must have no SPDX id");
|
||||
$this->assertNull($license->file, "{$license->acronym} must have no legal text file");
|
||||
});
|
||||
}
|
||||
|
||||
public function test_proper_licenses_have_spdx_id_file_and_uri(): void
|
||||
{
|
||||
$this->seed(LicenseSeeder::class);
|
||||
|
||||
$proper = License::where('kind', LicenseKind::License)->get();
|
||||
|
||||
$this->assertCount(7, $proper);
|
||||
$proper->each(function (License $license): void {
|
||||
$this->assertNotNull($license->spdx_id);
|
||||
$this->assertSame("{$license->spdx_id}.txt", $license->file);
|
||||
$this->assertNotNull($license->uri);
|
||||
});
|
||||
}
|
||||
|
||||
public function test_legal_text_files_ship_with_the_application(): void
|
||||
{
|
||||
$this->seed(LicenseSeeder::class);
|
||||
|
||||
License::whereNotNull('file')->get()->each(function (License $license): void {
|
||||
$this->assertFileExists(storage_path("app/public/licenses/{$license->file}"));
|
||||
});
|
||||
}
|
||||
|
||||
public function test_every_entry_has_an_admin_facing_description(): void
|
||||
{
|
||||
$this->seed(LicenseSeeder::class);
|
||||
|
||||
License::all()->each(function (License $license): void {
|
||||
$this->assertNotEmpty($license->description, "{$license->acronym} must have a description");
|
||||
});
|
||||
}
|
||||
|
||||
public function test_it_is_idempotent(): void
|
||||
{
|
||||
$this->seed(LicenseSeeder::class);
|
||||
$this->seed(LicenseSeeder::class);
|
||||
|
||||
$this->assertSame(11, License::count());
|
||||
}
|
||||
|
||||
public function test_database_seeder_includes_the_licenses(): void
|
||||
{
|
||||
$this->seed(DatabaseSeeder::class);
|
||||
|
||||
$this->assertSame(11, License::count());
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ namespace Tests\Feature\Models;
|
||||
use App\Models\Institution;
|
||||
use App\Models\InstitutionLink;
|
||||
use App\Models\Lists\InstitutionCategory;
|
||||
use App\Models\UserAffiliation;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Support\Str;
|
||||
use Tests\TestCase;
|
||||
@@ -86,6 +87,14 @@ class InstitutionTest extends TestCase
|
||||
$this->assertCount(1, $institution->refresh()->links);
|
||||
}
|
||||
|
||||
public function test_it_has_many_affiliations(): void
|
||||
{
|
||||
$institution = Institution::factory()->create();
|
||||
UserAffiliation::factory()->create(['institution_id' => $institution->id]);
|
||||
|
||||
$this->assertCount(1, $institution->refresh()->affiliations);
|
||||
}
|
||||
|
||||
public function test_it_is_soft_deleted(): void
|
||||
{
|
||||
$institution = Institution::factory()->create();
|
||||
|
||||
21
backend/tests/Feature/Models/UserTest.php
Normal file
21
backend/tests/Feature/Models/UserTest.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Models;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\UserAffiliation;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class UserTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_it_has_many_affiliations(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
UserAffiliation::factory()->create(['user_id' => $user->id]);
|
||||
|
||||
$this->assertCount(1, $user->refresh()->affiliations);
|
||||
}
|
||||
}
|
||||
391
backend/tests/Feature/UserAffiliationControllerTest.php
Normal file
391
backend/tests/Feature/UserAffiliationControllerTest.php
Normal file
@@ -0,0 +1,391 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Models\Institution;
|
||||
use App\Models\Lists\UserPosition;
|
||||
use App\Models\User;
|
||||
use App\Models\UserAffiliation;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class UserAffiliationControllerTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
private const BASE_ROUTE = '/api/user-affiliations';
|
||||
|
||||
private const JSON_HEADERS = ['Accept' => 'application/json'];
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $overrides
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
private function validPayload(array $overrides = []): array
|
||||
{
|
||||
return array_merge([
|
||||
'institution_id' => Institution::factory()->create()->id,
|
||||
'user_id' => User::factory()->create()->id,
|
||||
'user_position_id' => UserPosition::factory()->create()->id,
|
||||
'start_year' => 2020,
|
||||
'end_year' => null,
|
||||
], $overrides);
|
||||
}
|
||||
|
||||
// --- Lettura (pubblica, throttle:public) ----------------------------------
|
||||
|
||||
public function test_index_lists_affiliations_for_an_operational_user(): void
|
||||
{
|
||||
$this->actingAs($this->operationalUser(), 'sanctum');
|
||||
UserAffiliation::factory()->count(2)->create();
|
||||
|
||||
$this->getJson(self::BASE_ROUTE)
|
||||
->assertOk()
|
||||
->assertJsonStructure(['message', 'data', 'meta' => ['current_page', 'total']])
|
||||
->assertJsonCount(2, 'data');
|
||||
}
|
||||
|
||||
public function test_index_filters_by_institution_user_position_and_open(): void
|
||||
{
|
||||
$this->actingAs($this->operationalUser(), 'sanctum');
|
||||
$institution = Institution::factory()->create();
|
||||
$user = User::factory()->create();
|
||||
$position = UserPosition::factory()->create();
|
||||
|
||||
$open = UserAffiliation::factory()->create([
|
||||
'institution_id' => $institution->id,
|
||||
'user_id' => $user->id,
|
||||
'user_position_id' => $position->id,
|
||||
'end_year' => null,
|
||||
]);
|
||||
UserAffiliation::factory()->create(['end_year' => 2019]);
|
||||
|
||||
$this->getJson(self::BASE_ROUTE."?institution_id={$institution->id}")
|
||||
->assertOk()
|
||||
->assertJsonCount(1, 'data');
|
||||
|
||||
$this->getJson(self::BASE_ROUTE."?user_id={$user->id}")
|
||||
->assertOk()
|
||||
->assertJsonCount(1, 'data');
|
||||
|
||||
$this->getJson(self::BASE_ROUTE."?user_position_id={$position->id}")
|
||||
->assertOk()
|
||||
->assertJsonCount(1, 'data');
|
||||
|
||||
$this->getJson(self::BASE_ROUTE.'?open=1')
|
||||
->assertOk()
|
||||
->assertJsonPath('data.0.id', $open->id)
|
||||
->assertJsonCount(1, 'data');
|
||||
|
||||
$this->getJson(self::BASE_ROUTE.'?open=0')
|
||||
->assertOk()
|
||||
->assertJsonCount(1, 'data');
|
||||
}
|
||||
|
||||
public function test_index_can_list_only_trashed(): void
|
||||
{
|
||||
$this->actingAs($this->operationalUser(), 'sanctum');
|
||||
$trashed = UserAffiliation::factory()->create();
|
||||
UserAffiliation::factory()->create();
|
||||
$trashed->delete();
|
||||
|
||||
$this->getJson(self::BASE_ROUTE)->assertJsonCount(1, 'data');
|
||||
$this->getJson(self::BASE_ROUTE.'?trashed=only')
|
||||
->assertOk()
|
||||
->assertJsonCount(1, 'data')
|
||||
->assertJsonPath('data.0.id', $trashed->id);
|
||||
$this->getJson(self::BASE_ROUTE.'?trashed=with')->assertJsonCount(2, 'data');
|
||||
}
|
||||
|
||||
public function test_show_returns_affiliation_with_institution_user_and_position(): void
|
||||
{
|
||||
$this->actingAs($this->operationalUser(), 'sanctum');
|
||||
$affiliation = UserAffiliation::factory()->create();
|
||||
|
||||
$this->getJson(self::BASE_ROUTE."/{$affiliation->id}")
|
||||
->assertOk()
|
||||
->assertJsonPath('data.id', $affiliation->id)
|
||||
->assertJsonStructure(['data' => ['institution', 'user', 'user_position']]);
|
||||
}
|
||||
|
||||
public function test_legacy_fields_are_hidden_from_the_json_output(): void
|
||||
{
|
||||
$this->actingAs($this->operationalUser(), 'sanctum');
|
||||
$affiliation = UserAffiliation::factory()->create([
|
||||
'legacy_user_id' => 123,
|
||||
'legacy_institution_id' => 456,
|
||||
]);
|
||||
|
||||
$this->getJson(self::BASE_ROUTE."/{$affiliation->id}")
|
||||
->assertOk()
|
||||
->assertJsonMissingPath('data.legacy_user_id')
|
||||
->assertJsonMissingPath('data.legacy_institution_id');
|
||||
}
|
||||
|
||||
// --- Scrittura (tier.app, non riservata all'Admin) ------------------------
|
||||
|
||||
public function test_operational_user_can_create_an_affiliation(): void
|
||||
{
|
||||
$this->actingAs($this->operationalUser(), 'sanctum');
|
||||
|
||||
$this->postJson(self::BASE_ROUTE, $this->validPayload(), self::JSON_HEADERS)
|
||||
->assertCreated()
|
||||
->assertJsonStructure(['data' => ['id', 'institution', 'user', 'user_position']]);
|
||||
|
||||
$this->assertDatabaseCount('user_affiliations', 1);
|
||||
}
|
||||
|
||||
public function test_create_validates_required_fields(): void
|
||||
{
|
||||
$this->actingAs($this->operationalUser(), 'sanctum');
|
||||
|
||||
$this->postJson(self::BASE_ROUTE, [])
|
||||
->assertStatus(422)
|
||||
->assertJsonValidationErrors(['institution_id', 'user_id', 'user_position_id', 'start_year']);
|
||||
}
|
||||
|
||||
public function test_create_rejects_a_second_open_affiliation_for_the_same_institution_and_user(): void
|
||||
{
|
||||
$this->actingAs($this->operationalUser(), 'sanctum');
|
||||
$institution = Institution::factory()->create();
|
||||
$user = User::factory()->create();
|
||||
UserAffiliation::factory()->create([
|
||||
'institution_id' => $institution->id,
|
||||
'user_id' => $user->id,
|
||||
'end_year' => null,
|
||||
]);
|
||||
|
||||
$this->postJson(self::BASE_ROUTE, $this->validPayload([
|
||||
'institution_id' => $institution->id,
|
||||
'user_id' => $user->id,
|
||||
'end_year' => null,
|
||||
]))
|
||||
->assertStatus(422)
|
||||
->assertJsonValidationErrors(['institution_id']);
|
||||
}
|
||||
|
||||
public function test_create_allows_a_new_open_affiliation_after_the_previous_one_was_closed(): void
|
||||
{
|
||||
$this->actingAs($this->operationalUser(), 'sanctum');
|
||||
$institution = Institution::factory()->create();
|
||||
$user = User::factory()->create();
|
||||
UserAffiliation::factory()->create([
|
||||
'institution_id' => $institution->id,
|
||||
'user_id' => $user->id,
|
||||
'end_year' => 2019,
|
||||
]);
|
||||
|
||||
$this->postJson(self::BASE_ROUTE, $this->validPayload([
|
||||
'institution_id' => $institution->id,
|
||||
'user_id' => $user->id,
|
||||
'end_year' => null,
|
||||
]))->assertCreated();
|
||||
}
|
||||
|
||||
public function test_create_allows_a_new_open_affiliation_after_the_previous_one_was_soft_deleted(): void
|
||||
{
|
||||
$this->actingAs($this->operationalUser(), 'sanctum');
|
||||
$institution = Institution::factory()->create();
|
||||
$user = User::factory()->create();
|
||||
$trashed = UserAffiliation::factory()->create([
|
||||
'institution_id' => $institution->id,
|
||||
'user_id' => $user->id,
|
||||
'end_year' => null,
|
||||
]);
|
||||
$trashed->delete();
|
||||
|
||||
$this->postJson(self::BASE_ROUTE, $this->validPayload([
|
||||
'institution_id' => $institution->id,
|
||||
'user_id' => $user->id,
|
||||
'end_year' => null,
|
||||
]))->assertCreated();
|
||||
}
|
||||
|
||||
public function test_create_allows_two_open_affiliations_for_the_same_user_at_different_institutions(): void
|
||||
{
|
||||
$this->actingAs($this->operationalUser(), 'sanctum');
|
||||
$user = User::factory()->create();
|
||||
UserAffiliation::factory()->create(['user_id' => $user->id, 'end_year' => null]);
|
||||
|
||||
$this->postJson(self::BASE_ROUTE, $this->validPayload(['user_id' => $user->id, 'end_year' => null]))
|
||||
->assertCreated();
|
||||
}
|
||||
|
||||
public function test_operational_user_can_update_an_affiliation(): void
|
||||
{
|
||||
$this->actingAs($this->operationalUser(), 'sanctum');
|
||||
$affiliation = UserAffiliation::factory()->create(['start_year' => 2018, 'end_year' => null]);
|
||||
|
||||
$payload = $this->validPayload([
|
||||
'institution_id' => $affiliation->institution_id,
|
||||
'user_id' => $affiliation->user_id,
|
||||
'end_year' => 2022,
|
||||
]);
|
||||
|
||||
$this->putJson(self::BASE_ROUTE."/{$affiliation->id}", $payload)
|
||||
->assertOk()
|
||||
->assertJsonPath('data.end_year', 2022);
|
||||
|
||||
$this->assertSame(2022, $affiliation->fresh()->end_year);
|
||||
}
|
||||
|
||||
public function test_update_allows_keeping_the_affiliation_open(): void
|
||||
{
|
||||
$this->actingAs($this->operationalUser(), 'sanctum');
|
||||
$affiliation = UserAffiliation::factory()->create(['end_year' => null]);
|
||||
|
||||
$payload = $this->validPayload([
|
||||
'institution_id' => $affiliation->institution_id,
|
||||
'user_id' => $affiliation->user_id,
|
||||
'end_year' => null,
|
||||
]);
|
||||
|
||||
$this->putJson(self::BASE_ROUTE."/{$affiliation->id}", $payload)->assertOk();
|
||||
}
|
||||
|
||||
public function test_update_rejects_opening_a_second_affiliation_for_the_same_institution_and_user(): void
|
||||
{
|
||||
$this->actingAs($this->operationalUser(), 'sanctum');
|
||||
$institution = Institution::factory()->create();
|
||||
$user = User::factory()->create();
|
||||
UserAffiliation::factory()->create([
|
||||
'institution_id' => $institution->id,
|
||||
'user_id' => $user->id,
|
||||
'end_year' => null,
|
||||
]);
|
||||
$closed = UserAffiliation::factory()->create([
|
||||
'institution_id' => $institution->id,
|
||||
'user_id' => $user->id,
|
||||
'end_year' => 2019,
|
||||
]);
|
||||
|
||||
$payload = $this->validPayload([
|
||||
'institution_id' => $institution->id,
|
||||
'user_id' => $user->id,
|
||||
'end_year' => null,
|
||||
]);
|
||||
|
||||
$this->putJson(self::BASE_ROUTE."/{$closed->id}", $payload)
|
||||
->assertStatus(422)
|
||||
->assertJsonValidationErrors(['institution_id']);
|
||||
}
|
||||
|
||||
public function test_operational_user_can_soft_delete_an_affiliation(): void
|
||||
{
|
||||
$this->actingAs($this->operationalUser(), 'sanctum');
|
||||
$affiliation = UserAffiliation::factory()->create();
|
||||
|
||||
$this->deleteJson(self::BASE_ROUTE."/{$affiliation->id}")->assertOk();
|
||||
|
||||
$this->assertSoftDeleted($affiliation);
|
||||
}
|
||||
|
||||
public function test_operational_user_can_restore_a_trashed_affiliation(): void
|
||||
{
|
||||
$this->actingAs($this->operationalUser(), 'sanctum');
|
||||
$affiliation = UserAffiliation::factory()->create();
|
||||
$affiliation->delete();
|
||||
|
||||
$this->postJson(self::BASE_ROUTE."/{$affiliation->id}/restore")
|
||||
->assertOk()
|
||||
->assertJsonPath('data.id', $affiliation->id);
|
||||
|
||||
$this->assertNotSoftDeleted($affiliation);
|
||||
}
|
||||
|
||||
public function test_restore_is_blocked_when_another_open_affiliation_exists_for_the_same_institution_and_user(): void
|
||||
{
|
||||
$this->actingAs($this->operationalUser(), 'sanctum');
|
||||
$institution = Institution::factory()->create();
|
||||
$user = User::factory()->create();
|
||||
$trashed = UserAffiliation::factory()->create([
|
||||
'institution_id' => $institution->id,
|
||||
'user_id' => $user->id,
|
||||
'end_year' => null,
|
||||
]);
|
||||
$trashed->delete();
|
||||
UserAffiliation::factory()->create([
|
||||
'institution_id' => $institution->id,
|
||||
'user_id' => $user->id,
|
||||
'end_year' => null,
|
||||
]);
|
||||
|
||||
$this->postJson(self::BASE_ROUTE."/{$trashed->id}/restore")
|
||||
->assertStatus(409)
|
||||
->assertJsonPath('in_use', true);
|
||||
|
||||
$this->assertSoftDeleted($trashed);
|
||||
}
|
||||
|
||||
public function test_restore_succeeds_when_the_conflicting_affiliation_was_closed(): void
|
||||
{
|
||||
$this->actingAs($this->operationalUser(), 'sanctum');
|
||||
$institution = Institution::factory()->create();
|
||||
$user = User::factory()->create();
|
||||
$trashed = UserAffiliation::factory()->create([
|
||||
'institution_id' => $institution->id,
|
||||
'user_id' => $user->id,
|
||||
'end_year' => null,
|
||||
]);
|
||||
$trashed->delete();
|
||||
UserAffiliation::factory()->create([
|
||||
'institution_id' => $institution->id,
|
||||
'user_id' => $user->id,
|
||||
'end_year' => 2019,
|
||||
]);
|
||||
|
||||
$this->postJson(self::BASE_ROUTE."/{$trashed->id}/restore")->assertOk();
|
||||
|
||||
$this->assertNotSoftDeleted($trashed);
|
||||
}
|
||||
|
||||
public function test_restore_succeeds_for_a_closed_affiliation_even_when_another_one_is_open(): void
|
||||
{
|
||||
$this->actingAs($this->operationalUser(), 'sanctum');
|
||||
$institution = Institution::factory()->create();
|
||||
$user = User::factory()->create();
|
||||
$trashed = UserAffiliation::factory()->create([
|
||||
'institution_id' => $institution->id,
|
||||
'user_id' => $user->id,
|
||||
'end_year' => 2019,
|
||||
]);
|
||||
$trashed->delete();
|
||||
UserAffiliation::factory()->create([
|
||||
'institution_id' => $institution->id,
|
||||
'user_id' => $user->id,
|
||||
'end_year' => null,
|
||||
]);
|
||||
|
||||
$this->postJson(self::BASE_ROUTE."/{$trashed->id}/restore")->assertOk();
|
||||
|
||||
$this->assertNotSoftDeleted($trashed);
|
||||
}
|
||||
|
||||
public function test_operational_user_can_force_delete_an_affiliation(): void
|
||||
{
|
||||
$this->actingAs($this->operationalUser(), 'sanctum');
|
||||
$affiliation = UserAffiliation::factory()->create();
|
||||
$affiliation->delete();
|
||||
|
||||
$this->deleteJson(self::BASE_ROUTE."/{$affiliation->id}/force")->assertOk();
|
||||
|
||||
$this->assertDatabaseMissing('user_affiliations', ['id' => $affiliation->id]);
|
||||
}
|
||||
|
||||
// --- Autorizzazione ---------------------------------------------------------
|
||||
|
||||
public function test_guests_can_read_affiliations(): void
|
||||
{
|
||||
UserAffiliation::factory()->create();
|
||||
|
||||
$this->getJson(self::BASE_ROUTE)->assertOk();
|
||||
}
|
||||
|
||||
public function test_guests_cannot_write_affiliations(): void
|
||||
{
|
||||
$affiliation = UserAffiliation::factory()->create();
|
||||
|
||||
$this->postJson(self::BASE_ROUTE, [])->assertUnauthorized();
|
||||
$this->deleteJson(self::BASE_ROUTE."/{$affiliation->id}")->assertUnauthorized();
|
||||
}
|
||||
}
|
||||
27
backend/tests/Unit/LicenseKindTest.php
Normal file
27
backend/tests/Unit/LicenseKindTest.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit;
|
||||
|
||||
use App\Enums\LicenseKind;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class LicenseKindTest extends TestCase
|
||||
{
|
||||
public function test_every_case_has_a_non_empty_label(): void
|
||||
{
|
||||
foreach (LicenseKind::cases() as $case) {
|
||||
$this->assertNotSame('', $case->label());
|
||||
}
|
||||
}
|
||||
|
||||
public function test_rights_statement_case_value_and_label(): void
|
||||
{
|
||||
$this->assertSame('rights_statement', LicenseKind::RightsStatement->value);
|
||||
$this->assertSame('Rights statement', LicenseKind::RightsStatement->label());
|
||||
}
|
||||
|
||||
public function test_it_is_a_string_backed_enum(): void
|
||||
{
|
||||
$this->assertSame(LicenseKind::Mark, LicenseKind::from('mark'));
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,8 @@
|
||||
# docker-compose.override.yml — Sviluppo locale
|
||||
# Attivo automaticamente con: docker compose up -d
|
||||
# → avvia l'intero stack di sviluppo: Vite dev server (HMR) + backend
|
||||
# (artisan serve) + db + redis + docs + mailpit, dietro Traefik.
|
||||
# (artisan serve) + db + redis + mailpit, dietro Traefik.
|
||||
# (la documentazione non è nello stack: GitHub Pages / `make docs`)
|
||||
#
|
||||
# In produzione si usa SOLO il compose base (niente override, niente Traefik):
|
||||
# docker compose -f docker-compose.yml up -d
|
||||
|
||||
@@ -164,19 +164,8 @@ services:
|
||||
- "com.docker.compose.project=dyncoll-project"
|
||||
- "com.docker.compose.stack=dyncoll-project"
|
||||
|
||||
docs:
|
||||
image: squidfunk/mkdocs-material
|
||||
container_name: dyncoll_docs
|
||||
restart: always
|
||||
# L'immagine ha ENTRYPOINT ["mkdocs"]: serviamo il sito in ascolto su 8000.
|
||||
command: ["serve", "--dev-addr=0.0.0.0:8000"]
|
||||
volumes:
|
||||
# mkdocs si aspetta mkdocs.yml in /docs e i contenuti in /docs/docs
|
||||
- ./documentation:/docs:ro
|
||||
networks:
|
||||
- internal
|
||||
labels:
|
||||
- "com.docker.compose.project=dyncoll-project"
|
||||
# NB: la documentazione (MkDocs) non ha un servizio dedicato: la pubblica
|
||||
# GitHub Pages (.github/workflows/docs.yml); anteprima locale con `make docs`.
|
||||
|
||||
frontend:
|
||||
image: dyncoll-frontend:3.0
|
||||
|
||||
BIN
docs/assets/logo_dyncoll_graphic.png
Normal file
BIN
docs/assets/logo_dyncoll_graphic.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
17
docs/developer/index.md
Normal file
17
docs/developer/index.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Developer guide
|
||||
|
||||
Architecture, data model and API of the Dynamic Collection platform, for
|
||||
developers and integrators.
|
||||
|
||||
At a glance: an API-only **Laravel** backend (Sanctum + Fortify, MySQL,
|
||||
Redis/Horizon), a **Vite + TypeScript** multi-page frontend with islands
|
||||
(Tailwind v4 + daisyUI, Leaflet, 3DHOP), and a **Linked Art** provider
|
||||
exposing records for harvesting by the Swedish national aggregator
|
||||
(KSamsök 2).
|
||||
|
||||
## Chapters
|
||||
|
||||
- **[Licenses](licenses.md)** — the license vocabulary: data model, seeding,
|
||||
legal text files, REUSE constraints and API endpoints.
|
||||
|
||||
*More chapters will follow as the platform takes shape.*
|
||||
67
docs/developer/licenses.md
Normal file
67
docs/developer/licenses.md
Normal file
@@ -0,0 +1,67 @@
|
||||
# Licenses
|
||||
|
||||
The license vocabulary: data model, seeding, legal text files and API. For
|
||||
the user-facing overview see the [User guide](../user/licenses.md).
|
||||
|
||||
## Data model
|
||||
|
||||
Licenses are a controlled vocabulary (table `licenses`, model
|
||||
`App\Models\Lists\License`), created and populated at install time by the
|
||||
`LicenseSeeder` — **not** by the v1 ETL.
|
||||
|
||||
| Column | Meaning |
|
||||
|---|---|
|
||||
| `name` | Official full name (e.g. *Attribution 4.0 International*) |
|
||||
| `acronym` | Display label shown in the UI (e.g. *CC BY 4.0*) |
|
||||
| `spdx_id` | [SPDX](https://spdx.org/licenses/) identifier for export and interoperability; `NULL` for entries outside the SPDX License List — never invent one |
|
||||
| `kind` | Backed enum `App\Enums\LicenseKind`: `license`, `mark` or `rights_statement` |
|
||||
| `description` | One-sentence explanation shown in the forms |
|
||||
| `uri` | Canonical URI (creativecommons.org / rightsstatements.org), also used in the Linked Art JSON-LD |
|
||||
| `file` | File name of the legal text bundled in media download zips; `NULL` where no legal text exists |
|
||||
| `for_record` / `for_media` | Scope flags: records only accept open licenses (CC0, CC BY), media accept everything |
|
||||
| `sort_order` | Ordering in selects, from the most open to the most restrictive |
|
||||
| `active` | Soft retirement: an inactive license disappears from forms but stays valid for content already using it |
|
||||
|
||||
Scope and `active` filtering happens in the form selects **and** is
|
||||
re-validated server side; an edit form must still include the currently
|
||||
assigned license even when it is inactive or out of scope.
|
||||
|
||||
## Seeding and legacy ids
|
||||
|
||||
The seeder ships 11 entries: Public Domain Mark + the CC 4.0 family + the
|
||||
three most common rights statements (*InC*, *InC-EDU*, *CNE*). Ids **1–3 are
|
||||
fixed** and match the legacy v1 database (1 = PDM, 2 = CC0, 3 = CC BY) so the
|
||||
ETL maps artifact/media foreign keys 1:1 without translation. Further entries
|
||||
can be added by administrators at runtime.
|
||||
|
||||
## Legal texts and downloads
|
||||
|
||||
The official CC legal texts live in
|
||||
**`backend/storage/app/public/licenses/`**, named after their SPDX id
|
||||
(e.g. `CC-BY-4.0.txt`). They are versioned in the repository — an exception
|
||||
in `storage/app/public/.gitignore` — so they exist from the first clone. From
|
||||
there the backend bundles them into media download zips, and the frontend can
|
||||
link them directly (`/storage/licenses/…`, via `php artisan storage:link`).
|
||||
Marks and rights statements have no legal text (`file` is `NULL`): the zip
|
||||
only carries their canonical URI.
|
||||
|
||||
!!! warning "REUSE"
|
||||
The root `LICENSES/` directory is reserved for the licenses **of the
|
||||
repository**: [REUSE](https://reuse.software) fails the lint on license
|
||||
texts not referenced by any file ("unused license"), and duplicate SPDX
|
||||
file names anywhere under `LICENSES/` crash the tool. That is why the
|
||||
downloadable texts live under `backend/storage/`. Their provenance is
|
||||
annotated in `REUSE.toml`: Creative Commons dedicates the text of its
|
||||
licenses to the public domain (CC0), which is also why `LICENSES/`
|
||||
contains `CC0-1.0.txt`.
|
||||
|
||||
## API
|
||||
|
||||
| Endpoint | Access | Purpose |
|
||||
|---|---|---|
|
||||
| `GET /api/licenses` | public | list; filters `scope=record\|media`, `active=0\|1` |
|
||||
| `GET /api/licenses/{id}` | public | detail |
|
||||
| `GET /api/licenses/{id}/usage` | authenticated | is the license in use? |
|
||||
| `POST /api/licenses` | admin | create an entry |
|
||||
| `PUT/PATCH /api/licenses/{id}` | admin | update (partial updates supported, e.g. only `active`) |
|
||||
| `DELETE /api/licenses/{id}` | admin | delete; blocked with `409` when the entry is in use |
|
||||
22
docs/index.md
Normal file
22
docs/index.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Dynamic Collection
|
||||
|
||||
User and technical documentation for the **Dynamic Collection** platform
|
||||
(version 2).
|
||||
|
||||
Dynamic Collection is a platform for cataloguing and curating digital
|
||||
collections of archaeological artifacts, developed by the
|
||||
[DARKLab](https://www.darklab.lu.se/) at Lund University. Version 2 exposes
|
||||
its data through the **KSamsök 2 Linked Art** harvesting standard of the
|
||||
Swedish National Heritage Board (Riksantikvarieämbetet, RAÄ), so that records
|
||||
can be collected by the Swedish national aggregator.
|
||||
|
||||
!!! note "Work in progress"
|
||||
This documentation is being written alongside the rewrite of the
|
||||
platform: sections will appear as the corresponding features land.
|
||||
|
||||
## Where to go
|
||||
|
||||
- **[User guide](user/index.md)** — for cataloguers, curators and
|
||||
administrators working with collections through the web interface.
|
||||
- **[Developer guide](developer/index.md)** — architecture, data model and
|
||||
API reference for developers and integrators.
|
||||
29
docs/stylesheets/extra.css
Normal file
29
docs/stylesheets/extra.css
Normal file
@@ -0,0 +1,29 @@
|
||||
/* Brand alignment with the Dynamic Collection application
|
||||
(see frontend/src/styles/main.css: --dc-primary, --dc-secondary). */
|
||||
|
||||
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;700&display=swap');
|
||||
|
||||
:root {
|
||||
/* --dc-primary rgb(34, 69, 138) */
|
||||
--md-primary-fg-color: #22458a;
|
||||
--md-primary-fg-color--light: #4a6cb0;
|
||||
/* --dc-primary-dark rgb(0, 15, 46) */
|
||||
--md-primary-fg-color--dark: #000f2e;
|
||||
/* --dc-secondary-dark rgb(241, 146, 4) — links/hover accents */
|
||||
--md-accent-fg-color: #f19204;
|
||||
}
|
||||
|
||||
[data-md-color-scheme='slate'] {
|
||||
--md-primary-fg-color: #22458a;
|
||||
--md-accent-fg-color: #f9b958;
|
||||
}
|
||||
|
||||
/* Display font for headings and site title, consistent with the app logo. */
|
||||
.md-typeset h1,
|
||||
.md-typeset h2,
|
||||
.md-typeset h3,
|
||||
.md-typeset h4,
|
||||
.md-header__topic {
|
||||
font-family: 'Rajdhani', 'Titillium Web', ui-sans-serif, system-ui, sans-serif;
|
||||
font-weight: 700;
|
||||
}
|
||||
11
docs/user/index.md
Normal file
11
docs/user/index.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# User guide
|
||||
|
||||
How to work with Dynamic Collection through the web interface: cataloguing
|
||||
artifacts and 3D models, uploading media, and administering the platform.
|
||||
|
||||
## Chapters
|
||||
|
||||
- **[Licenses](licenses.md)** — how records and media are licensed, which
|
||||
options are available, and how to choose the right one.
|
||||
|
||||
*More chapters will follow as the platform takes shape.*
|
||||
66
docs/user/licenses.md
Normal file
66
docs/user/licenses.md
Normal file
@@ -0,0 +1,66 @@
|
||||
# Licenses
|
||||
|
||||
Every **record** (artifact or 3D model) and every **media file** (image,
|
||||
document, video) in Dynamic Collection carries a license that tells the world
|
||||
what can be done with it. This chapter explains the available options and how
|
||||
to choose.
|
||||
|
||||
## Not everything is a license
|
||||
|
||||
The platform distinguishes three kinds of entries:
|
||||
|
||||
- **Licenses** grant permissions: the Creative Commons family (CC0, CC BY,
|
||||
…). Choosing one tells reusers exactly what they are allowed to do.
|
||||
- **The Public Domain Mark** (PDM) declares that a work is *already* free of
|
||||
known copyright — for instance because copyright has expired. It grants
|
||||
nothing new; it labels an existing status.
|
||||
- **Rights statements** ([RightsStatements.org](https://rightsstatements.org))
|
||||
label media that are closed or whose status is uncertain. Copyrighted
|
||||
material is not "licensed": it is labelled with one of these (e.g. *In
|
||||
Copyright*).
|
||||
|
||||
## Records vs media
|
||||
|
||||
**Records** must stay open — that is the point of publishing them — so only
|
||||
**CC0 1.0** and **CC BY 4.0** can be selected. **Media files** may need the
|
||||
full range, including closed options: a photograph may be under copyright
|
||||
even when the record describing the artifact is open.
|
||||
|
||||
The forms only offer the options valid for what you are editing.
|
||||
|
||||
!!! note "Editing existing content"
|
||||
An edit form always includes the currently assigned license, even if an
|
||||
administrator has since retired it: you are never forced to change the
|
||||
license of existing content just to save an unrelated edit.
|
||||
|
||||
## Available options
|
||||
|
||||
From the most open to the most restrictive:
|
||||
|
||||
| Option | Kind | What it means |
|
||||
|---|---|---|
|
||||
| PDM 1.0 | mark | Already free of known copyright worldwide (e.g. expired). |
|
||||
| CC0 1.0 | license | The rights holder waives all rights: any use, no attribution required. |
|
||||
| CC BY 4.0 | license | Any use, including commercial, with credit to the creator. |
|
||||
| CC BY-SA 4.0 | license | Like CC BY, but derivatives must keep the same license. |
|
||||
| CC BY-NC 4.0 | license | Reuse with attribution, non-commercial only. |
|
||||
| CC BY-NC-SA 4.0 | license | Non-commercial, with attribution, same license on derivatives. |
|
||||
| CC BY-ND 4.0 | license | Redistribution with attribution, but no derivative works. |
|
||||
| CC BY-NC-ND 4.0 | license | Most restrictive CC: share with credit, no changes, no commercial use. |
|
||||
| InC | rights statement | In copyright, all rights reserved: reuse requires permission. |
|
||||
| InC-EDU | rights statement | In copyright, but educational use is permitted. |
|
||||
| CNE | rights statement | Copyright not evaluated yet: treat as potentially protected. |
|
||||
|
||||
Each option shows a short explanation in the form when selected. When media
|
||||
are downloaded, the zip archive includes the full legal text of the license
|
||||
(for CC licenses) or the canonical URI of the statement.
|
||||
|
||||
## For administrators
|
||||
|
||||
Licenses are managed from the admin panel:
|
||||
|
||||
- **Add** further entries when needed — for example other RightsStatements.org
|
||||
statements (*InC-NC*, *NoC-NC*, *NKC*, *UND*, …).
|
||||
- **Retire** an option by deactivating it: it disappears from the forms but
|
||||
remains valid for the content that already uses it. This is always
|
||||
preferable to deletion, which is only possible for entries not in use.
|
||||
@@ -1,16 +0,0 @@
|
||||
# Dynamic Collection v2
|
||||
|
||||
Documentazione utente e tecnica della piattaforma **Dynamic Collection** (versione 2).
|
||||
|
||||
Piattaforma per la catalogazione e curatela di collezioni digitali di reperti
|
||||
archeologici, con esposizione dei dati secondo lo standard di harvesting
|
||||
**KSamsök 2 Linked Art** del Riksantikvarieämbetet (RAÄ).
|
||||
|
||||
!!! note "Lavori in corso"
|
||||
Questa documentazione è in fase di stesura insieme alla riscrittura della piattaforma.
|
||||
|
||||
## Sezioni
|
||||
|
||||
- Guida utente — *in arrivo*
|
||||
- Guida sviluppatore — *in arrivo*
|
||||
- Endpoint LOD / Linked Art — *in arrivo*
|
||||
@@ -1,22 +0,0 @@
|
||||
site_name: Dynamic Collection v2
|
||||
site_description: Documentazione della piattaforma Dynamic Collection (v2)
|
||||
repo_url: https://github.com/LundDarkLab/adc
|
||||
|
||||
docs_dir: docs
|
||||
|
||||
theme:
|
||||
name: material
|
||||
palette:
|
||||
primary: indigo
|
||||
features:
|
||||
- navigation.tabs
|
||||
- navigation.sections
|
||||
- content.code.copy
|
||||
|
||||
markdown_extensions:
|
||||
- admonition
|
||||
- pymdownx.highlight
|
||||
- pymdownx.superfences
|
||||
|
||||
nav:
|
||||
- Home: index.md
|
||||
53
mkdocs.yml
Normal file
53
mkdocs.yml
Normal file
@@ -0,0 +1,53 @@
|
||||
site_name: Dynamic Collection
|
||||
site_description: Documentation of the Dynamic Collection platform (v2)
|
||||
site_url: https://lunddarklab.github.io/adc/
|
||||
repo_url: https://github.com/LundDarkLab/adc
|
||||
|
||||
docs_dir: docs
|
||||
|
||||
theme:
|
||||
name: material
|
||||
logo: assets/logo_dyncoll_graphic.png
|
||||
favicon: assets/logo_dyncoll_graphic.png
|
||||
font:
|
||||
text: Titillium Web
|
||||
code: Roboto Mono
|
||||
palette:
|
||||
# Brand colors (--dc-primary / --dc-secondary) are defined in
|
||||
# stylesheets/extra.css; `custom` tells Material to use them.
|
||||
- media: "(prefers-color-scheme: light)"
|
||||
scheme: default
|
||||
primary: custom
|
||||
accent: custom
|
||||
toggle:
|
||||
icon: material/brightness-7
|
||||
name: Switch to dark mode
|
||||
- media: "(prefers-color-scheme: dark)"
|
||||
scheme: slate
|
||||
primary: custom
|
||||
accent: custom
|
||||
toggle:
|
||||
icon: material/brightness-4
|
||||
name: Switch to light mode
|
||||
features:
|
||||
- navigation.tabs
|
||||
- navigation.sections
|
||||
- navigation.top
|
||||
- content.code.copy
|
||||
|
||||
extra_css:
|
||||
- stylesheets/extra.css
|
||||
|
||||
markdown_extensions:
|
||||
- admonition
|
||||
- pymdownx.highlight
|
||||
- pymdownx.superfences
|
||||
|
||||
nav:
|
||||
- Home: index.md
|
||||
- User guide:
|
||||
- Overview: user/index.md
|
||||
- Licenses: user/licenses.md
|
||||
- Developer guide:
|
||||
- Overview: developer/index.md
|
||||
- Licenses: developer/licenses.md
|
||||
Reference in New Issue
Block a user