Skip to Content.
Sympa Menu

comanage-dev - [comanage-dev] Re: Validation for CO People

Subject: COmanage Developers List

List archive

[comanage-dev] Re: Validation for CO People


Chronological Thread 
  • From: Benn Oshrin <>
  • To: Marie Huynh <>
  • Cc: comanage-dev <>
  • Subject: [comanage-dev] Re: Validation for CO People
  • Date: Thu, 09 May 2013 22:53:36 -0400
  • Authentication-results: sfpop-ironport03.merit.edu; dkim=neutral (message not signed) header.i=none

The validation rule is accurate as far as status for CO People is concerned, and the wiki is out of date.

Note that StatusEnum is *also* correct... it is a superset of possible status values. This is a bit ugly, and there is a ticket open (CO-106) to improve the situation.

status_t/ti is legacy stuff that can't quite go away yet (CO-170).

-Benn-

On 5/9/13 4:32 PM, Marie Huynh wrote:
I was looking through the wiki and saw status defined as:

* A: Active
* D: Deleted
* I: Invited
* P: Pending Invite
* X: Invite Declined
* S: Suspended

In enum:

class StatusEnum
{
const Active = 'A';
const Approved = 'Y';
const Confirmed = 'C';
const Deleted = 'D';
const Denied = 'N';
const Invited = 'I';
const Pending = 'P';
const PendingApproval = 'PA';
const PendingConfirmation = 'PC';
const Suspended = 'S';
const Declined = 'X';
...

$status_t = array(
'A' => 'Active',
'D' => 'Deleted',
'I' => 'Invited',
'N' => 'Denied',
'P' => 'Pending',
'PA' => 'PendingApproval',
'S' => 'Suspended',
'X' => 'Declined',
'Y' => 'Approved'
);

$status_ti = array(
'Active' => 'A',
'Deleted' => 'D',
'Invited' => 'I',
'Denied' => 'N',
'Pending' => 'P',
'PendingApproval' => 'PA',
'Suspended' => 'S',
'Declined' => 'X',
'Approved' => 'Y'
);

In the model though, it's validated with:

'status' => array(
'rule' => array('inList', array(StatusEnum::Active,
StatusEnum::Approved,
StatusEnum::Declined,
StatusEnum::Deleted,
StatusEnum::Denied,
StatusEnum::Invited,
StatusEnum::Pending,
StatusEnum::PendingApproval,
StatusEnum::PendingConfirmation,
StatusEnum::Suspended)),

Which is accurate?

Marie




Archive powered by MHonArc 2.6.16.

Top of Page