}
}
protected void addPermissions(QName qname)
{
MetadataDescriptor metadata = getMetadata();
//
// make sure read-only properties aren't modified from the
// outside (can still be mutable inside)
//
boolean readOnly = metadata.isReadOnlyExternal(qname);
PropertyChangeApprover security = new ExternalChangeApprover(qname, readOnly);
security.setSecurityToken(getSecurityToken());
addChangeApprover(security);
//
// if we can't update, we're either appendable (insert only)
// or constant (read only). we need an enforcer!
//
if (!metadata.canUpdate(qname))
{
PropertyChangeApprover approver = null;
//
// insert only
//
if (metadata.canInsert(qname))
approver = new InsertOnlyApprover(qname);
//
// read only
//