Revision 8208
Added by ben leinfelder over 11 years ago
lib/metacat.properties | ||
---|---|---|
528 | 528 |
D1Client.resourcesDir=/var/metacat/dataone |
529 | 529 |
# Member Node configuration |
530 | 530 |
dataone.nodeId= |
531 |
dataone.subject=CN=METACAT1, DC=dataone, DC=org
|
|
532 |
dataone.contactSubject=CN=METACAT1, DC=dataone, DC=org
|
|
531 |
dataone.subject=CN=urn:node:METACAT1,DC=dataone,DC=org
|
|
532 |
dataone.contactSubject=CN=Scientist 1234,DC=dataone,DC=org
|
|
533 | 533 |
dataone.nodeName=My Metacat Node |
534 | 534 |
dataone.nodeType=mn |
535 | 535 |
dataone.nodeDescription=Describe your Member Node briefly. |
src/edu/ucsb/nceas/metacat/util/AuthUtil.java | ||
---|---|---|
32 | 32 |
import javax.servlet.http.HttpServletRequest; |
33 | 33 |
import javax.servlet.http.HttpSession; |
34 | 34 |
|
35 |
import org.apache.log4j.Logger; |
|
36 |
|
|
35 | 37 |
import edu.ucsb.nceas.metacat.AuthSession; |
36 | 38 |
import edu.ucsb.nceas.metacat.properties.PropertyService; |
37 | 39 |
import edu.ucsb.nceas.metacat.service.SessionService; |
... | ... | |
41 | 43 |
import edu.ucsb.nceas.utilities.StringUtil; |
42 | 44 |
|
43 | 45 |
public class AuthUtil { |
46 |
|
|
47 |
public static Logger logMetacat = Logger.getLogger(AuthUtil.class); |
|
44 | 48 |
|
45 | 49 |
private static Vector<String> administrators = null; |
46 | 50 |
private static Vector<String> moderators = null; |
... | ... | |
116 | 120 |
+ pnfe.getMessage()); |
117 | 121 |
} |
118 | 122 |
administrators = StringUtil.toVector(administratorString, ':'); |
123 |
|
|
124 |
String d1NodeAdmin = null; |
|
125 |
try { |
|
126 |
d1NodeAdmin = PropertyService.getProperty("dataone.subject"); |
|
127 |
administrators.add(d1NodeAdmin); |
|
128 |
} catch (PropertyNotFoundException e) { |
|
129 |
String msg = "Could not get metacat property: dataone.subject " |
|
130 |
+ "There will be no registered DataONE adminstrator"; |
|
131 |
logMetacat.error(msg, e); |
|
132 |
|
|
133 |
} |
|
119 | 134 |
} |
120 | 135 |
|
121 | 136 |
/** |
Also available in: Unified diff
include the dataone.subject (node admin) in the list of administrators. This allows full administrative access to objects when using certificates+d1 api. https://projects.ecoinformatics.org/ecoinfo/issues/6086