You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by je...@apache.org on 2015/11/04 18:20:26 UTC

[8/8] allura git commit: [#7999] ticket:857 Add documentation

[#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/09414050
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/09414050
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/09414050

Branch: refs/heads/ib/7999
Commit: 094140500e151130c5ec8956e1e8843f16c336fd
Parents: e9e814d
Author: Igor Bondarenko <je...@gmail.com>
Authored: Wed Nov 4 19:16:36 2015 +0200
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Wed Nov 4 19:16: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/09414050/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/09414050/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
 ========================