Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Commit

Permalink
Added test code fro creating test user and adding user membership
Browse files Browse the repository at this point in the history
  • Loading branch information
Anusha Ranganathan committed Apr 14, 2012
1 parent 76a039a commit 8c8a74c
Show file tree
Hide file tree
Showing 10 changed files with 1,492 additions and 14 deletions.
19 changes: 19 additions & 0 deletions add_user.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from rdfdatabank.lib.auth_entry import add_user, add_user_groups
import sys

if __name__ == "__main__":
username = sys.argv[1]
password = sys.argv[2]
email = sys.argv[3]
user_details = {
'username':u'%s'%username,
'password':u"%s"%password,
'name':u'Databank Administrator',
'email':u"%s"%email
}
add_user(user_details)

groups = []
groups.append(('*', 'administrator'))
add_user_groups(groups)

1 change: 1 addition & 0 deletions persisted_state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
2 changes: 1 addition & 1 deletion rdfdatabank.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: rdfdatabank
Version: 0.2
Version: 0.3
Summary: RDF-enhanced, pairtree-backed storage API
Home-page: https://github.com/dataflow/RDFDatabank
Author: Anusha Ranganathan, Ben O'Steen
Expand Down
10 changes: 0 additions & 10 deletions rdfdatabank/controllers/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,25 +382,15 @@ def siloview(self, silo):
# and then remove the silo
todelete_silo = ag.granary.get_rdf_silo(silo)
for item in todelete_silo.list_items():
<<<<<<< HEAD
ag.b.deletion(silo, item, ident=ident['repoze.who.userid'])

ag.granary.delete_silo(silo)

ag.b.silo_deletion(silo, ident=ident['repoze.who.userid'])
=======
try:
ag.b.deletion(silo_name, item, ident=ident['repoze.who.userid'])
except:
pass

ag.granary.delete_silo(silo_name)
try:
ag.b.silo_deletion(silo_name, ident=ident['repoze.who.userid'])
except:
pass

>>>>>>> 01f8f90b4121355bfcab059dcda276272fa6475b
try:
del ag.granary.state[silo]
except:
Expand Down
2 changes: 2 additions & 0 deletions rdfdatabank/controllers/sword.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from sss.pylons_sword_controller import SwordController
__controller__ = "SwordController"
792 changes: 792 additions & 0 deletions rdfdatabank/lib/sword_server.py

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions rdfdatabank/templates/error.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# -*- coding: utf-8 -*-
<%inherit file="/base.html" />
<%def name="head_tags()">
<title> Error </title>
</%def>
<div class="httperrortitle">
<p>Oops!</p>
</div>
<div class="httperrorcode">
<h1>${c.code}</h1>
</div>
<div class="httperror">
<h3>${c.status}</h3>
<p>${c.message}</p>
</div>
Loading

0 comments on commit 8c8a74c

Please sign in to comment.