Adam Vessey
11 years ago
22 changed files with 424 additions and 94 deletions
@ -0,0 +1,26 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
/** |
||||||
|
* @file |
||||||
|
* Implementation of Rules hooks, giving default configurations. |
||||||
|
*/ |
||||||
|
|
||||||
|
/** |
||||||
|
* Implements hook_default_rules_configuration(). |
||||||
|
*/ |
||||||
|
function islandora_default_rules_configuration() { |
||||||
|
$rule = rules_reaction_rule(); |
||||||
|
$rule->label = 'E-mail admin'; |
||||||
|
$rule->active = FALSE; |
||||||
|
$rule |
||||||
|
->event('islandora_object_ingested') |
||||||
|
->action( |
||||||
|
'mail', |
||||||
|
array( |
||||||
|
'to' => '[site:mail]', |
||||||
|
'subject' => '[[site:name]] "[object:label]" has been ingested', |
||||||
|
'message' => '[object:label] has been ingested as [object:id].', |
||||||
|
) |
||||||
|
); |
||||||
|
return array('islandora_object_ingested_notify_admin' => $rule); |
||||||
|
} |
@ -0,0 +1,31 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<Policy xmlns="urn:oasis:names:tc:xacml:1.0:policy" |
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||||
|
PolicyId="permit-apim-to-anonymous-user" |
||||||
|
RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable"> |
||||||
|
<Description>note that other policies may provide exceptions to this broad policy. This policy assumes api-m users have to be authenticated</Description> |
||||||
|
<Target> |
||||||
|
<Subjects> |
||||||
|
<Subject> |
||||||
|
<SubjectMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> |
||||||
|
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">anonymous user</AttributeValue> |
||||||
|
<SubjectAttributeDesignator AttributeId="fedoraRole" MustBePresent="false" |
||||||
|
DataType="http://www.w3.org/2001/XMLSchema#string"/> |
||||||
|
</SubjectMatch> |
||||||
|
</Subject> |
||||||
|
</Subjects> |
||||||
|
<Resources> |
||||||
|
<AnyResource/> |
||||||
|
</Resources> |
||||||
|
<Actions> |
||||||
|
<Action> |
||||||
|
<ActionMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> |
||||||
|
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">urn:fedora:names:fedora:2.1:action:api-m</AttributeValue> |
||||||
|
<ActionAttributeDesignator DataType="http://www.w3.org/2001/XMLSchema#string" |
||||||
|
AttributeId="urn:fedora:names:fedora:2.1:action:api"/> |
||||||
|
</ActionMatch> |
||||||
|
</Action> |
||||||
|
</Actions> |
||||||
|
</Target> |
||||||
|
<Rule RuleId="1" Effect="Permit"/> |
||||||
|
</Policy> |
@ -0,0 +1,31 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<Policy xmlns="urn:oasis:names:tc:xacml:1.0:policy" |
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||||
|
PolicyId="permit-upload-to-anonymous-user" |
||||||
|
RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable"> |
||||||
|
<Description></Description> |
||||||
|
<Target> |
||||||
|
<Subjects> |
||||||
|
<Subject> |
||||||
|
<SubjectMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> |
||||||
|
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">anonymous user</AttributeValue> |
||||||
|
<SubjectAttributeDesignator AttributeId="fedoraRole" MustBePresent="false" |
||||||
|
DataType="http://www.w3.org/2001/XMLSchema#string"/> |
||||||
|
</SubjectMatch> |
||||||
|
</Subject> |
||||||
|
</Subjects> |
||||||
|
<Resources> |
||||||
|
<AnyResource/> |
||||||
|
</Resources> |
||||||
|
<Actions> |
||||||
|
<Action> |
||||||
|
<ActionMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> |
||||||
|
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">urn:fedora:names:fedora:2.1:action:id-upload</AttributeValue> |
||||||
|
<ActionAttributeDesignator DataType="http://www.w3.org/2001/XMLSchema#string" |
||||||
|
AttributeId="urn:fedora:names:fedora:2.1:action:id"/> |
||||||
|
</ActionMatch> |
||||||
|
</Action> |
||||||
|
</Actions> |
||||||
|
</Target> |
||||||
|
<Rule RuleId="1" Effect="Permit"/> |
||||||
|
</Policy> |
@ -0,0 +1,19 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
# Get the end portion of the TRAVIS_REPO_SLUG for the branch name. |
||||||
|
DELIMITED_SLUG = $(echo $TRAVIS_REPO_SLUG | tr "/" "\n") |
||||||
|
CURRENT_REPO = "${DELIMITED_SLUG[1]}" |
||||||
|
|
||||||
|
# Git business |
||||||
|
export VERBOSE_DIR = $HOME/sites/default/files/simpletest/verbose |
||||||
|
cd $HOME |
||||||
|
git clone https://islandora-logger:$LOGGER_PW@github.com/Islandora/islandora_travis_logs.git |
||||||
|
cd islandora_travis_logs |
||||||
|
git checkout -B $CURRENT_REPO |
||||||
|
|
||||||
|
# Out with the old, in with the new |
||||||
|
git rm $HOME/islandora_travis_logs/*.* |
||||||
|
cp $VERBOSE_DIR/*.* $HOME/islandora_travis_logs |
||||||
|
git add -A |
||||||
|
git commit -m "Job: $TRAVIS_JOB_NUMBER Commit: $TRAVIS_COMMIT" |
||||||
|
git push origin $CURRENT_REPO |
Loading…
Reference in new issue