allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jetm...@apache.org
Subject [08/16] allura git commit: [#7999] ticket:857 Add documentation
Date Wed, 18 Nov 2015 16:06:07 GMT
[#7999] ticket:857 Add documentation


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/d8fff6d0
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/d8fff6d0
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/d8fff6d0

Branch: refs/heads/ib/7999a
Commit: d8fff6d01e118836bc899b4e12e4462a7dcb8022
Parents: caa5672
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Wed Nov 4 19:16:36 2015 +0200
Committer: Igor Bondarenko <jetmind2@gmail.com>
Committed: Mon Nov 16 14:18:36 2015 +0200

----------------------------------------------------------------------
 Allura/allura/scripts/delete_projects.py       |  6 +--
 Allura/docs/getting_started/administration.rst | 44 ++++++++++++++++++++-
 2 files changed, 46 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/d8fff6d0/Allura/allura/scripts/delete_projects.py
----------------------------------------------------------------------
diff --git a/Allura/allura/scripts/delete_projects.py b/Allura/allura/scripts/delete_projects.py
index cedf87b..1c53b76 100644
--- a/Allura/allura/scripts/delete_projects.py
+++ b/Allura/allura/scripts/delete_projects.py
@@ -96,11 +96,11 @@ class DeleteProjects(ScriptTask):
     def parser(cls):
         parser = argparse.ArgumentParser(description='Completely delete projects')
         parser.add_argument('projects', metavar='nbhd/project', type=str, nargs='+',
-                            help='Project to delete in a form nbhd_prefix/shortname')
+                            help='List of projects to delete in a form nbhd_prefix/shortname')
         parser.add_argument('-r', '--reason', type=str,
-                            help='Reason why these projects being deleted')
+                            help='Reason why these projects are being deleted')
         parser.add_argument('--disable-users', action='store_true', default=False,
-                            help='Disable all project members')
+                            help='Disable all users belonging to groups Admin and Developer
in these projects.')
         return parser
 
 

http://git-wip-us.apache.org/repos/asf/allura/blob/d8fff6d0/Allura/docs/getting_started/administration.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/getting_started/administration.rst b/Allura/docs/getting_started/administration.rst
index 8673840..bd9aef3 100644
--- a/Allura/docs/getting_started/administration.rst
+++ b/Allura/docs/getting_started/administration.rst
@@ -35,6 +35,7 @@ The admin interface allows you to:
 
 * View newly registered projects
 * Search for projects
+* :ref:`Delete projects <delete-projects>`
 * View neighborhood total stats
 * Search for users, view user details, update user status, email address, and reset their
password
 * View background task statuses, and submit new background tasks
@@ -76,7 +77,7 @@ Scripts are in the `scripts/` directory and run slightly differently, via
`paste
 
      paster script development.ini ../scripts/create-allura-sitemap.py -- -u 100
 
-To run these when using docker, prefix with :code:`docker-compose run web` and use :code:`docker-dev.ini`
like::
+To run these when using docker, prefix with :code:`docker-compose run taskd` and use :code:`docker-dev.ini`
like::
 
     docker-compose run taskd paster create-neighborhood docker-dev.ini myneighborhood myuser
...
 
@@ -175,6 +176,21 @@ disable_users.py
     :prog: paster script development.ini allura/scripts/disable_users.py --
 
 
+.. _delete-projects-py:
+
+delete_projects.py
+------------------
+
+*Can be run as a background task using task name:* :code:`allura.scripts.delete_projects.DeleteProjects`
+
+More convenient way to delete project is :ref:`this site admin page <delete-projects>`.
It uses this script under the hood.
+
+.. argparse::
+    :module: allura.scripts.delete_projects
+    :func: get_parser
+    :prog: paster script development.ini allura/scripts/delete_projects.py --
+
+
 refreshrepo.py
 --------------
 
@@ -274,6 +290,32 @@ indefinitely (until closed).  The notification content can contain HTML.
 Only t
 most recent notification will be shown, unless it has `active:false`, in which case
 no notification will be shown.
 
+.. _delete-projects:
+
+Deleting projects
+=================
+
+Site administrators can delete projects using web interface. This is running
+:ref:`delete_projects.py script <delete-projects-py>` under the hood. You can
+access it choosing "Delete projects" from the left sidebar on the :ref:`site
+admin interface <site-admin-interface>`.
+
+**Be careful, projects and all related data are actually deleted from the database!**
+
+Just copy and paste URLs of the project you want to delete into "Projects"
+field. You can also use :code:`nbhd_prefix/project_shortname` format, e.g.
+
+
+.. code-block:: text
+
+  http://MYSITE/p/test/wiki/
+  p/test2
+
+will delete projects :code:`test` and :code:`test2`.
+
+The "Reason" field allows you to specify a reason for deletion, which will be logged to disk.
+
+"Disable all project members" checkbox disables all users belonging to groups "Admin" and
"Developer" in these projects. The reason will be also recorded in the users' audit logs if
this option is checked.
 
 Using Projects and Tools
 ========================


Mime
View raw message