Semantic MediaWiki and related extensions
Public Member Functions | List of all members
SMW\Protection\ProtectionValidator Class Reference

Public Member Functions

 __construct (Store $store, EntityCache $entityCache, PermissionManager $permissionManager)
 
 registerPropertyChangeListener (PropertyChangeListener $propertyChangeListener)
 
 invalidateCache (DIProperty $property, ChangeRecord $changeRecord)
 
 setEditProtectionRight ( $editProtectionRight)
 
 getEditProtectionRight ()
 
 setCreateProtectionRight ( $createProtectionRight)
 
 getCreateProtectionRight ()
 
 setChangePropagationProtection ( $changePropagationProtection)
 
 setImportPerformers (array $importPerformers)
 
 hasEditProtectionOnNamespace (Title $title)
 
 isClassifiedAsImportPerformerProtected (Title $title, User $user)
 
 hasChangePropagationProtection (Title $title)
 
 hasProtection (Title $title)
 
 hasCreateProtection (Title $title=null)
 
 hasEditProtection (Title $title=null)
 

Detailed Description

Handles protection validation.

GNU GPL v2+

Since
2.5
Author
mwjames

Constructor & Destructor Documentation

◆ __construct()

SMW\Protection\ProtectionValidator::__construct ( Store  $store,
EntityCache  $entityCache,
PermissionManager  $permissionManager 
)
Since
2.5
Parameters
Store$store
EntityCache$entityCache
PermissionManager$permissionManager

Member Function Documentation

◆ getCreateProtectionRight()

SMW\Protection\ProtectionValidator::getCreateProtectionRight ( )
Since
3.0
Returns
string|false

◆ getEditProtectionRight()

SMW\Protection\ProtectionValidator::getEditProtectionRight ( )
Since
3.0
Returns
string|false

◆ hasChangePropagationProtection()

SMW\Protection\ProtectionValidator::hasChangePropagationProtection ( Title  $title)
Since
2.5
Parameters
Title$title
Returns
boolean

◆ hasCreateProtection()

SMW\Protection\ProtectionValidator::hasCreateProtection ( Title  $title = null)
Since
3.0
Parameters
Title$title
Returns
boolean

◆ hasEditProtection()

SMW\Protection\ProtectionValidator::hasEditProtection ( Title  $title = null)
Note
There is not direct validation of the permission within this method, it is done by the Title::userCan when probing against the User and hooks that carry out the permission check including the validation provided by SMW's PermissionManager.
Since
2.5
Parameters
Title$title
Returns
boolean

◆ hasEditProtectionOnNamespace()

SMW\Protection\ProtectionValidator::hasEditProtectionOnNamespace ( Title  $title)
Since
2.5
Parameters
Title$title
Returns
boolean

◆ hasProtection()

SMW\Protection\ProtectionValidator::hasProtection ( Title  $title)
Since
2.5
Parameters
Title$title
Returns
boolean

◆ invalidateCache()

SMW\Protection\ProtectionValidator::invalidateCache ( DIProperty  $property,
ChangeRecord  $changeRecord 
)
Since
3.2
Parameters
DIProperty$property
ChangeRecord$changeRecord

◆ isClassifiedAsImportPerformerProtected()

SMW\Protection\ProtectionValidator::isClassifiedAsImportPerformerProtected ( Title  $title,
User  $user 
)

If a page was imported by a dedicated import_performer and the performer is the creator of the page, yet the current user that is trying to edit the page isn't matched to the creator/import performer then the page is classified as to be protected to make sure only an import performer can alter the content without having to fear that other users may have changed the content hereby may loose information when replacing the content during the next import.

Since
3.2
Parameters
Title$title
User$user
Returns
boolean

◆ registerPropertyChangeListener()

SMW\Protection\ProtectionValidator::registerPropertyChangeListener ( PropertyChangeListener  $propertyChangeListener)
Since
3.2
Parameters
PropertyChangeListener$propertyChangeListener

◆ setChangePropagationProtection()

SMW\Protection\ProtectionValidator::setChangePropagationProtection (   $changePropagationProtection)
Since
3.0
Parameters
boolean$changePropagationProtection

◆ setCreateProtectionRight()

SMW\Protection\ProtectionValidator::setCreateProtectionRight (   $createProtectionRight)
Since
2.5
Parameters
string | boolean$createProtectionRight

◆ setEditProtectionRight()

SMW\Protection\ProtectionValidator::setEditProtectionRight (   $editProtectionRight)
Since
2.5
Parameters
string | boolean$editProtectionRight

◆ setImportPerformers()

SMW\Protection\ProtectionValidator::setImportPerformers ( array  $importPerformers)
Since
3.2
Parameters
array$importPerformers

The documentation for this class was generated from the following file:

About | General disclaimer | Privacy policy