In POET, you assign rights to users or groups by creating PtRights and storing them. Each PtRight assigns rights to a given class. There are two kinds of PtRights: PtClassRight assigns rights to a class regardless of the values of the objects, and PtAttributeRight assigns rights to those objects of a class which contain certain values.
To store a PtRight, you must have POETADM rights. See "User Authorization" for details.
The PtRight class is pre-registered in every POET dictionary, and classes for ondemands, sets, allsets, and queries for PtRight have also been pre-registered.
The following table lists the pre-registered classes, and shows the equivalent class declaration for each class:
PtRight | _persistent class PtRight |
PtRightOnDemand | typedef ondemand<PtRight> PtRightOnDemand |
PtRightOnDemandCSet | typedef cset<ondemand<PtRight>> PtRightOnDemandCSet; |
PtRight does not have a public constructor. In your programs, you should not create a PtRight directly, you should create a PtClassRight or a PtAttributeRight. Each of these classes is derived from PtRight.
Files to include | Class declaration | Base class |
poet.hxx ptuser.hxx | ptrights.hxx | PtObject |
protected constructor | PtRight(PtUser* , PtClassId& , unsigned short readable, unsigned short writable, unsigned short deletable); |
protected destructor | virtual ~PtRight(); |
AddToList | virtual int AddToList(PtLinkedList*); |
ClearDeletable | inline void ClearDeletable(); |
ClearReadable | inline void ClearReadable(); |
ClearWritable | inline void ClearWritable(); |
GetDescId | inline PtClassId GetDescId(); |
IsDeletable | inline int IsDeletable(); |
IsReadable | inline int IsReadable(); |
IsWritable | inline int IsWritable(); |
Match | virtual int Match(PtClassId& ); |
SetDeletable | inline void SetDeletable(); |
SetReadable | inline void SetReadable(); |
SetWritable | inline void SetWritable(); |
- PtRight::PtRight(PtUser* , PtClassId& , unsigned short readable, unsigned short writable, unsigned short deletable)
This constructor is protected, so you can not call it directly. You should always create an object whose class is derived from PtRight, such as PtClassRight or PtAttributeRight.
- virtual PtRight::~PtRight()
- virtual PtRight::AddToList()
This method is used for internal purposes only.
- inline void PtRight::ClearDeletable()
Clears the delete rights for the class that this PtRight governs.
- inline void PtRight::ClearReadable()
Clears the read rights for the class that this PtRight governs.
- inline void PtRight::ClearWritable()
Clears the write rights for the class that this PtRight governs.
- inline PtClassId PtRight::GetDescId()
Returns the PtClassId for the class that this PtRight governs.
- inline int PtRight::IsDeletable()
Reports whether this PtRight grants delete rights.
- inline int PtRight::IsReadable()
Reports whether this PtRight grants read rights.
- inline int PtRight::IsWritable()
Reports whether this PtRight grants write rights.
- virtual int PtRight::Match(PtClassId& )
Determines whether the PtRight grants rights for the given class. This function is virtual; in the PtRight class, it always returns 0. The interesting implementation is in the class PtClassRight.
- virtual int PtRight::Match(PtClassId &clid, PtClassId &scope, unsigned short mempos, PtTypeId typid)
Determines whether the PtRight grants rights for the given class. This function is virtual; in the PtRight class, it always returns 0. The interesting implementation is in the class PtAttributeRight.
- inline void PtRight::SetDeletable()
Sets delete rights for the PtRight. These rights first become active when you store the PtRight.
- inline void PtRight::SetReadable()
Sets read rights for the PtRight. These rights first become active when you store the PtRight.
- inline void PtRight::SetWritable()
Sets write rights for the PtRight. These rights first become active when you store the PtRight.
Copyright (c) 1996 POET Software, Inc. All rights reserved. Reproduction in whole or in part in any form or medium without the express permission of POET Software, Inc. is prohibited.