Giter Site home page Giter Site logo

discoverygarden / embargoes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fsulib/embargoes

0.0 2.0 7.0 275 KB

DEPRECATED: This module has been replaced by https://github.com/discoverygarden/embargo

License: GNU General Public License v2.0

PHP 97.74% Twig 2.26%
drupal-module drupal-8 drupal-9 deprecated

embargoes's Introduction

Deprecated

This module has been deprecated in favor of Embargo

Embargoes

Adds the ability to manage embargo policies with access restrictions on content.

Requirements

This module requires the following modules/libraries:

Installation

Install as usual.

Configuration

Configuration options can be set at admin/config/content/embargoes/settings, including notification options and IP range settings that can apply to embargoes.

To add an IP range for use on embargoes, navigate to admin/config/content/embargoes/settings/ips and click 'Add IP range'. Ranges created via this method can then be used as IP address whitelists when creating embargoes.

Usage

Applying an embargo

An embargo can be applied to an existing node by navigating to node/{node_id}/embargoes. From here, an embargo can be applied if it doesn't already exist, and existing embargoes can be modified or removed.

Maintainers/Sponsors

License

GPLv2

embargoes's People

Contributors

adam-vessey avatar bibliophileaxe avatar bryjbrown avatar chrismacdonaldw avatar iamlkeno avatar jojoves avatar jordandukart avatar lutaylor avatar morgandawe avatar nchiasson-dgi avatar nigelgbanks avatar willtp87 avatar

Watchers

 avatar  avatar

embargoes's Issues

[BUG] WSOD on Media page

I installed Embargoes, and then found that I could not access the Media page at admin/content/media. It turns out to happen because I had a media type that didn't have any entity reference fields (i.e. wasn't set up for Islandora).

The error in Drupal's logs was:

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax     
error or access violation: 1064 You have an error in your SQL syntax;      
check the manual that corresponds to your MySQL server version for the     
right syntax to use near '' at line 4: SELECT "base_table"."vid" AS        
"vid", "base_table"."nid" AS "nid"                                         
 FROM                                                                       
"node" "base_table"                                                        
WHERE; Array 

With XDebug, I placed the exploding query at https://github.com/discoverygarden/embargoes/blob/1.x/src/EmbargoesEmbargoesService.php#L277, i.e. trying to do a node query with an empty orConditionGroup.

Views not respecting embargo

I took an Islandora 1.1.0 image and created a collection with two items:
Screen Shot 2021-02-05 at 2 55 17 PM

I then embargoed one of the collection members: "Item One, to be embargoed":
Screen Shot 2021-02-05 at 2 56 19 PM

I then opened an incognito window to view the collection:
Screen Shot 2021-02-05 at 2 56 59 PM

Notice that it gives a some-what misleading message, because it seems to indicate the collection is under embargo, while only one object in the collection actually is. (Side-note: so we should probably use the node's title instead of "This resource".) You will also see that the teaser of the embargoed node is still shown in the members view.

Clicking on the embargoed node's link does direct us to an "access denied" page; although the node shouldn't have appeared in the first place:
Screen Shot 2021-02-05 at 2 57 25 PM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.