• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

Plasma

  • Plasma
  • AuthorizationRule
Public Types | Signals | Public Member Functions | List of all members
Plasma::AuthorizationRule Class Reference

#include <authorizationrule.h>

Inheritance diagram for Plasma::AuthorizationRule:
Inheritance graph
[legend]

Public Types

enum  Persistence { Transient = 0, Persistent = 1 }
 
enum  Policy { Deny = 0, Allow = 1, PinRequired = 2 }
 
enum  Target { Default = 0, AllUsers = 1, AllServices = 2 }
 

Signals

void changed (Plasma::AuthorizationRule *)
 

Public Member Functions

 ~AuthorizationRule ()
 
Credentials credentials () const
 
QString description () const
 
Persistence persistence ()
 
QString pin () const
 
Policy policy ()
 
QString serviceName () const
 
void setPersistence (Persistence persistence)
 
void setPin (const QString &pin)
 
void setPolicy (Policy policy)
 
void setTargets (Targets targets)
 
Targets targets ()
 

Detailed Description

Defines a rule indicating whether or not a certain service can be accessed by a certain machine.

Rules allow you to have control over which computers are allowed to access which services. Every time a message get's in, AuthorizationManager validates it's sender, and then checks it's list of rules for rules matching the sender and/or the service. If no rules match, or all matching rules have the value Unspecified, AuthorizationManager will create a new rule for this message, and invoke authorize on your shells implementation of AuthorizationInterface. Here, you can change that rule to either allow or deny that request. This class can be used to specify different types of rules:

  • Rules matching only a user
  • Rules matching only a service
  • Rules matching both a service, and a user. A more specific rule always takes precedence over a more global rule: so if for example you have a rule for "myAwesomeService" specifying Deny, and a rule for "myAwesomeService" in combination with "130.42.120.146" as caller specifying Allow, only 130.42.120.146 can access myAwesomeService. By setting the PinRequired flag in setRules in an AuthorizationInterface implementation, you trigger Pin pairing (user will be asked to enter the same password on both machines).
Since
4.4?

Definition at line 67 of file authorizationrule.h.

Member Enumeration Documentation

enum Plasma::AuthorizationRule::Persistence
Enumerator
Transient 

specify that this rule is just valid for this session.

Persistent 

specify that this rule will be saved between sessions.

Definition at line 79 of file authorizationrule.h.

enum Plasma::AuthorizationRule::Policy
Enumerator
Deny 

access for messages matching this rule is denied.

Allow 

access for messages matching this rule is allowed.

PinRequired 

specify that the user will need to enter a pin at both sides

Definition at line 73 of file authorizationrule.h.

enum Plasma::AuthorizationRule::Target
Enumerator
Default 
AllUsers 

specify that this rule is valid for all users

AllServices 

specify that this rule is valid for all services

Definition at line 84 of file authorizationrule.h.

Constructor & Destructor Documentation

Plasma::AuthorizationRule::~AuthorizationRule ( )

Definition at line 89 of file authorizationrule.cpp.

Member Function Documentation

void Plasma::AuthorizationRule::changed ( Plasma::AuthorizationRule *  )
signal
Credentials Plasma::AuthorizationRule::credentials ( ) const
Returns
the identity of the caller.

Definition at line 159 of file authorizationrule.cpp.

QString Plasma::AuthorizationRule::description ( ) const
Returns
a friendly and i18n'd description of the current rule, useful for creating a GUI to allow editing rules, or asking permission for an access attempt.

Definition at line 94 of file authorizationrule.cpp.

AuthorizationRule::Persistence Plasma::AuthorizationRule::persistence ( )
Returns
the flags describing this rule.

Definition at line 143 of file authorizationrule.cpp.

QString Plasma::AuthorizationRule::pin ( ) const
Returns
the pin for pin pairing.

Definition at line 154 of file authorizationrule.cpp.

AuthorizationRule::Policy Plasma::AuthorizationRule::policy ( )
Returns
the flags describing this rule.

Definition at line 121 of file authorizationrule.cpp.

QString Plasma::AuthorizationRule::serviceName ( ) const
Returns
the name of the service this rule applies to.

Definition at line 164 of file authorizationrule.cpp.

void Plasma::AuthorizationRule::setPersistence ( Persistence  persistence)
Parameters
rulesthe flags describing this rule.

Definition at line 137 of file authorizationrule.cpp.

void Plasma::AuthorizationRule::setPin ( const QString &  pin)
Parameters
pinset pin for pin pairing. You'll need to call this bevore setting the rule.

Definition at line 148 of file authorizationrule.cpp.

void Plasma::AuthorizationRule::setPolicy ( Policy  policy)
Parameters
rulesthe flags describing this rule.

Definition at line 115 of file authorizationrule.cpp.

void Plasma::AuthorizationRule::setTargets ( Targets  targets)
Parameters
rulesthe flags describing this rule.

Definition at line 126 of file authorizationrule.cpp.

AuthorizationRule::Targets Plasma::AuthorizationRule::targets ( )
Returns
the flags describing this rule.

Definition at line 132 of file authorizationrule.cpp.


The documentation for this class was generated from the following files:
  • authorizationrule.h
  • authorizationrule.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:35 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal