[gq-commit] gq/src dt_oc.c,1.14,1.15
Status: Beta
Brought to you by:
sur5r
|
From: <sta...@us...> - 2003-09-28 23:20:55
|
Update of /cvsroot/gqclient/gq/src
In directory sc8-pr-cvs1:/tmp/cvs-serv25124
Modified Files:
dt_oc.c
Log Message:
* Support for single-value attributes and unmodifyable attributes
Index: dt_oc.c
===================================================================
RCS file: /cvsroot/gqclient/gq/src/dt_oc.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** dt_oc.c 28 Sep 2003 03:26:25 -0000 1.14
--- dt_oc.c 28 Sep 2003 23:20:47 -0000 1.15
***************
*** 354,362 ****
oc = find_oc_by_oc_name(ss, newtext);
if (oc) {
/* required attributes */
for(i = 0; oc->oc_at_oids_must && oc->oc_at_oids_must[i]; i++) {
form = lookup_attribute_using_schema(formlist,
oc->oc_at_oids_must[i],
! ss, NULL);
if (form) {
form->flags &= ~FLAG_DEL_ME;
--- 354,363 ----
oc = find_oc_by_oc_name(ss, newtext);
if (oc) {
+ LDAPAttributeType *at;
/* required attributes */
for(i = 0; oc->oc_at_oids_must && oc->oc_at_oids_must[i]; i++) {
form = lookup_attribute_using_schema(formlist,
oc->oc_at_oids_must[i],
! ss, &at);
if (form) {
form->flags &= ~FLAG_DEL_ME;
***************
*** 372,375 ****
--- 373,382 ----
MAX_ATTR_LEN);
form->flags |= FLAG_MUST_IN_SCHEMA;
+ if (at && at->at_single_value) {
+ form->flags |= FLAG_SINGLE_VALUE;
+ }
+ if (at && at->at_no_user_mod) {
+ form->flags |= FLAG_NO_USER_MOD;
+ }
set_displaytype(server, form);
formlist = formlist_append(formlist, form);
***************
*** 381,385 ****
form = lookup_attribute_using_schema(formlist,
oc->oc_at_oids_may[i],
! ss, NULL);
if (form) {
form->flags &= ~FLAG_DEL_ME;
--- 388,392 ----
form = lookup_attribute_using_schema(formlist,
oc->oc_at_oids_may[i],
! ss, &at);
if (form) {
form->flags &= ~FLAG_DEL_ME;
***************
*** 395,398 ****
--- 402,411 ----
strncpy(form->attrname, oc->oc_at_oids_may[i],
MAX_ATTR_LEN);
+ if (at && at->at_single_value) {
+ form->flags |= FLAG_SINGLE_VALUE;
+ }
+ if (at && at->at_no_user_mod) {
+ form->flags |= FLAG_NO_USER_MOD;
+ }
set_displaytype(server, form);
formlist = formlist_append(formlist, form);
|