Rights, reports and Support tools¶
Accessed via client.rights and client.admin.
client.rights.set(asset_id, "licensed", licence="CC BY 4.0") # needed before making an asset public
info = client.rights.moderation(asset_id) # active / disabled, with reasons
if info.status == "disabled":
client.rights.appeal(asset_id, "I created this photo.")
# Anyone, no login:
ComadClient("https://dam.example.com").rights.report(
"https://dam.example.com/assets/…", "My photograph", "A. Reporter", "a@example.com", "A. Reporter",
good_faith=True, accuracy_statement=True)
The admin methods are for the Support team and administrators only.
pycomad.client.RightsClient
¶
Rights declarations, moderation status, appeals and public reports.
get
¶
Return the owner's rights declaration for an asset.
Raises:
| Type | Description |
|---|---|
ComadNotFoundError
|
If the asset has no declaration yet. |
set
¶
set(asset_id: Union[UUID, str], status: str, *, licence: Optional[str] = None, source: Optional[str] = None, notes: Optional[str] = None) -> AssetRights
Declare the right to hold and share an asset (required before it can be made public).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
asset_id
|
Union[UUID, str]
|
The asset. |
required |
status
|
str
|
|
required |
licence
|
Optional[str]
|
Licence name or terms when |
None
|
source
|
Optional[str]
|
Where the material came from or who granted permission. |
None
|
notes
|
Optional[str]
|
Free text. |
None
|
moderation
¶
Return whether an asset is active or disabled, with the reasons and appeal state.
appeal
¶
Appeal the disabling of an asset you own (sends your counter-notice).
Raises:
| Type | Description |
|---|---|
ComadValidationError
|
If the asset is not disabled or has already been appealed. |
report
¶
report(asset_ref: str, work_description: str, reporter_name: str, reporter_email: str, signature: str, *, kind: str = 'copyright', good_faith: bool, accuracy_statement: bool, reporter_org: Optional[str] = None, reporter_address: Optional[str] = None) -> NoticeReceipt
Report an asset as infringing or illegal. Public: needs no login.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
asset_ref
|
str
|
The asset's address (URL) or id. |
required |
work_description
|
str
|
The infringed work, or why the content is illegal. |
required |
reporter_name
|
str
|
Your name. |
required |
reporter_email
|
str
|
Where decisions are sent. |
required |
signature
|
str
|
Typed full name as an electronic signature. |
required |
kind
|
str
|
|
'copyright'
|
good_faith
|
bool
|
Statement of good-faith belief that the use is not authorised / illegal. |
required |
accuracy_statement
|
bool
|
Statement that the information is accurate. |
required |
pycomad.client.AdminClient
¶
Support-team tools: review reports, the notification outbox, repeat infringers.
The server allows these only to the organisation's Support team (and administrators).
is_reviewer
¶
True when the caller may use the review tools (show the Reports page).
list_notices
¶
List reports, optionally by status (new, under_review, actioned,
rejected, restored).
decide_notice
¶
decide_notice(notice_id: Union[UUID, str], action: str, reason: Optional[str] = None) -> RightsNotice
Decide on a report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
notice_id
|
Union[UUID, str]
|
The report. |
required |
action
|
str
|
|
required |
reason
|
Optional[str]
|
Required for |
None
|
repeat_infringers
¶
List owners with actioned reports and whether they are over the policy threshold.
list_notifications
¶
List outbox emails, optionally by status (queued, sent, failed,
unconfirmed).
retry_notification
¶
Queue a failed or unconfirmed email again.
Raises:
| Type | Description |
|---|---|
ComadValidationError
|
If the email is not failed or unconfirmed. |