Custom EmbargoSetter allowing on campus access

11 views
Skip to first unread message

Shawn Kiewel

unread,
Aug 13, 2019, 3:31:35 PM8/13/19
to DSpace Technical Support
Does anyone have a custom EmbargoSetter class I could peek at that allows for access from campus IPs while enforcing the embargo for the world? I did look at this example, but it uses groups to do its filtering, and I'm not sure how to adapt it.

Thanks,
Shawn

Terry Brady

unread,
Aug 13, 2019, 5:39:51 PM8/13/19
to Shawn Kiewel, DSpace Technical Support
Shawn,

Have you configured ip authentication for your site?  The IP authentication will place a user session within a specific named "special group".

You could follow the example that you linked to but change the name of the group to the "special group" that you configure in the ip authentication config.

Terry

--
All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/8748ffae-215c-47d6-af34-fef0eae6d1b7%40googlegroups.com.


--
Terry Brady
Applications Programmer Analyst
Georgetown University Library Information Technology
425-298-5498 (Seattle, WA)

Terry Brady

unread,
Aug 13, 2019, 5:40:11 PM8/13/19
to Shawn Kiewel, DSpace Technical Support

Shawn Kiewel

unread,
Aug 14, 2019, 9:10:19 AM8/14/19
to DSpace Technical Support

Followup: reading the Advanced Customization page leads me to think I should place that file in [dspace-source]/dspace/modules/additions. Is this correct?

 

Thanks again for all the help.

Shawn

Terry Brady

unread,
Aug 15, 2019, 10:34:50 AM8/15/19
to Shawn Kiewel, DSpace Technical Support
Shawn,

I think modules/additions/src/main/java is the best place to put it.

Terry

Shawn Kiewel

unread,
Sep 11, 2019, 9:23:13 AM9/11/19
to DSpace Technical Support

So I’ve finally gotten around to trying to compile this with the only changes to the class being class name, group name, and package, and I’m getting compilation errors due to the imports not working. It’s not able to resolve the imported symbols:

 

[ERROR] /data/prod/src/dspace-6.1-src-release/dspace/modules/additions/src/main/java/edu/uga/dspace/embargo/UGAEmbargoSetter.java:[69,26] cannot find symbol

[ERROR] symbol:   variable AuthorizeManager

 

I’m also getting an error about implementing the interface because certain methods do not throw IOExceptions:

 

[ERROR] /data/prod/src/dspace-6.1-src-release/dspace/modules/additions/src/main/java/edu/uga/dspace/embargo/UGAEmbargoSetter.java:[89,19] parseTerms(org.dspace.core.Context,org.dspace.content.Item,java.lang.String) in edu.uga.dspace.embargo.UGAEmbargoSetter cannot implement parseTerms(org.dspace.core.Context,org.dspace.content.Item,java.lang.String) in org.dspace.embargo.EmbargoSetter

[ERROR] overridden method does not throw java.io.IOException

 

Suggestions?

Shawn Kiewel

unread,
Sep 11, 2019, 9:26:49 AM9/11/19
to DSpace Technical Support

 

 

 

 

From: Shawn Kiewel <smki...@gmail.com>
Date: Wednesday, September 11, 2019 at 9:23 AM
To: DSpace Technical Support <dspac...@googlegroups.com>
Subject: Re: [dspace-tech] Custom EmbargoSetter allowing on campus access

 

So I’ve finally gotten around to trying to compile this with the only changes to the class being class name, group name, and package, and I’m getting compilation errors due to the imports not working. It’s not able to resolve the imported symbols:

 

[ERROR] /data/prod/src/dspace-6.1-src-release/dspace/modules/additions/src/main/java/edu/uga/dspace/embargo/UGAEmbargoSetter.java:[69,26] cannot find symbol

[ERROR] symbol:   variable AuthorizeManager

 

I’m also getting an error about implementing the interface because certain methods do not throw IOExceptions:

 

[ERROR] /data/prod/src/dspace-6.1-src-release/dspace/modules/additions/src/main/java/edu/uga/dspace/embargo/UGAEmbargoSetter.java:[89,19] parseTerms(org.dspace.core.Context,org.dspace.content.Item,java.lang.String) in edu.uga.dspace.embargo.UGAEmbargoSetter cannot implement parseTerms(org.dspace.core.Context,org.dspace.content.Item,java.lang.String) in org.dspace.embargo.EmbargoSetter

[ERROR] overridden method does not throw java.io.IOException

 

Suggestions?

 

Shawn

 

 

 

 

From: Terry Brady <Terry...@georgetown.edu>


Date: Thursday, August 15, 2019 at 10:34 AM

Terry Brady

unread,
Sep 13, 2019, 2:11:19 AM9/13/19
to Shawn Kiewel, DSpace Technical Support
Shawn,

The prior version of the gist was for DSpace 5x.  I updated it for DSpace 6x.


Shawn Kiewel

unread,
Sep 16, 2019, 10:54:47 AM9/16/19
to DSpace Technical Support

Thanks. This compiled with no trouble at all.

Reply all
Reply to author
Forward
0 new messages