Edit this section

Contents

  1. Where would I put static files local to a particular wiki installation?
  2. What is a superuser?
  3. Access Control
    1. What are ACLs?
    2. What are Administrators?
    3. What are Groups?
    4. I get: "You can't change ACLs on this page since you have no admin rights on it!" What does that mean?
    5. Is it possible to enable the ''delete page'' right only for some users?
    6. How to hide certain pages from all users but some users?
    7. Setting a wiki for closed community
    8. How to allow only registered users to edit pages?
    9. How to disable new page creation
    10. How do I add a Edit-review-publish workflow?
    11. How do I add a new users group with limited rights but access to system/underlay pages?
  4. How to control who is able to create a user account?
  5. How to use HTTPS with Twisted server
  6. How to setup mail subscription?
  7. Excluding System Pages from Search Results
  8. How to add new interwiki sites?
  9. How to run a wiki without CamelCase
  10. How to migrate from MediaWiki
    1. Solution
  11. Advantages of running a farm
  12. Can apache REMOTE_USER replace moinmoin login?
  13. Why is MoinMoin dialling home?
  14. How do I dis/enable FullSearchCached ? (version 1.5.2)
  15. Is it possible to compress my wiki-instance or reduce the version history?
  16. Having two content areas not parallel but as set and subset
  17. disable spell checking
  18. Backing Up
  19. Adding Users
  20. Is it possible to merge 2 wikis?
  21. Moving And Merging MoinMoin Wikis
  22. Using relative URL rather than absolute ones ?
  23. Can we specify different startpages for different groups of people?
  24. Adding new pages via batch script
  25. How to limit login time / set automatic logout?
  26. Easy migration
  27. HowTo for SyncJob ?
  28. Is it possible to use dynamic mail configuration?
  29. How to get rid of the thank you message after editting
  30. How to add additional icon to icon toolbar when editting by GUI
  31. Adding search engine to an external html page
  32. Trivial change flag not visible
  33. Page name translation for multiple languages
  34. Managing users in groups
  35. Is 'url_mapping' the right way to handle changing drive-Letters (G:, H:, I:) of a standalone-wiki on usb-stick?
  36. How to sort users by account creation date as it was in earlier versions?
  37. Is it possible to log the offending ip with LDAPAuth
  38. Supplementation pages for all pages does not work

Where would I put static files local to a particular wiki installation?

I have a custom logo that I would like to use in place of the default one. I don't want to put this in the site-packages web\static\htdocs directory since this could be overwritten on upgrade.

Anywhere on your server, just add a directory directive for access rights and an Alias

I could attach this to a page but the attach: shorthand will not work across the site. So where would I put it under the wiki instance diretory?

if you use moins builtin server for static files it must be below MoinMoin/web/static. But you also can use apache additional

What is a superuser?

A superuser has some special "super" rights like installing packages. To define what a superuser is (it can be more than one) set this variable to the main user(s) in the wikiconfig.py file:

    superuser = [u"ExampleGirl", ]

Access Control

Access Control defines who may do what in a wiki. Moin does it with ACLs.

What are ACLs?

Access Control Lists. For more please read HelpOnAccessControlLists

What are Administrators?

An administrator is someone with full or limited admin rights. These can be defined either by changing the configuration files, or by defining a group like AdminGroup and list members.

What are Groups?

A group in MoinMoin wiki defines a group of users. The groups can consist of: Users, other groups, all registered users (Known) or all possible users (All). We will call all possible entries "members". A group page should ends with the term Group, but it can be localized and customized by the admin. UserGroup should work for default install.

A group contains the member names in a unnumbered list. Anything on the page which is not a list will be ignored by the group parser.

Note: the group name must be in CamelCase.

I get: "You can't change ACLs on this page since you have no admin rights on it!" What does that mean?

It means that the wiki thinks you tried to change the access rights of a page by editing a line with "#acl" (either you tried to edit, remove or add it). Only users with admin rights can do that. Please contact somebody like the wiki admin.

Is it possible to enable the ''delete page'' right only for some users?

Yes. Create a group page like "DeleteGroup" and add the members that should be able to delete pages. then add this to the acl_rights_before setting in the wiki config:

+DeleteGroup:delete

This adds the right "delete" to all members of the DeleteGroup. There are other ways to do it, but this is the most elegant way.

How to hide certain pages from all users but some users?

  1. Create KeyUsersGroup, see How To Create Groups

  2. On the pages that need to be hidden, use this ACL line.
    • #acl KeyUsersGroup:read,write,revert,delete All:

To unhide the pages, add read right to the All magic group. Read also HelpOnAccessControlLists

Setting a wiki for closed community

  1. Create the group MembersGroup and add the members user names. See How To Create Groups

  2. In your configuration file, either wikiconfig.py or farmconfig.py, set these variables:

    •     acl_rights_before = (u"MyName:read,write,revert,delete,admin MembersGroup:read,write,revert,delete")
          acl_rights_default = u"All:"

    /!\ These acl rights will result in problems on page-specific acls (as everyone is a member of MembersGroup, then acl processing stops - so page specific acls are ignored.) As an alternative, define the acl rights the following way:

    •   acl_rights_before = u"JohnDoe:read,write,delete,revert,admin +MembersGroup:read"
        acl_rights_default = u"MembersGroup:write All:"
    acl evaluation order:
    1. acl_rights_before are evaluated (so MembersGroup can read)

    2. page acl rights (if exist) - your chance to stop MembersGroup from writing

    3. acl_rights_default

    So, pages without acls will still allow someone from MembersGroup to read and write the page. And page-specific acls work again... such as this page acl I used on MembersGroup page to only allow me to edit the list of members (for a closed community):

    •   #acl JohnDoe:read,write,delete,revert,admin
        #format wiki
        These are people that can access the wiki:
         * JohnDoe
         * JaneFrank
         * ...

    signed John Doe, happy Moin user

How to allow only registered users to edit pages?

Add these ACL rules to the acl_rights_beforeoption in your wiki configuration:

Known:read,write,revert,delete All:read

Note that this does not give you much security, as anyone, even a robot can register an account just to spam your wiki.

How to disable new page creation

There is no explicit page creation right (see also HelpOnAccessControlLists for permissions and CategorySpam). You need to modify acl_rights_default (which is only used when no other ACLs are given on the page being accessed) to something like

  acl_rights_default = \
    "TrustedGroup:read,write,delete,revert \
    Known:read,delete,revert \
    All:read"

so that only the Trusted group can write to new, blank pages (which of course have no ACL yet), and then try to make sure that all pages have a ACL that overrides that and allows that proper people to write to that page.

How do I add a Edit-review-publish workflow?

There is no builtin workflow like this, but you use acl to create such workflow.

  1. First prevent editing on all page for anyone but a group of people you would like to create pages, for example, EditorsGroup

  2. Put this acl on new pages to be edited by your editors:
    • #acl EditorsGroup:read,write All:
  3. Now your editors can edit those pages, but those pages are hidden from all others.
  4. Review the edits
  5. To publish, change the All: acl to All:read

How do I add a new users group with limited rights but access to system/underlay pages?

Hi,

I'm currently running MM 1.8 in a corporate environment with a limited number of users. My Acls are set like this:

AdminsGroup is the user group which use the wiki in a daily basis and administer it (it's a limited number of people). ReadersGroup is a simple access to a limited number of people which need a read access to all the content (my boss and the like).

Now I want to add another group of users (call it AnotherGroup) with limited rights: I don't want it to be able to view all the content but only specific pages and to write only to specific pages too. It works using #acl on pages and using hierarchic acl I can give them the possibility to create pages under one. My problem is with underlay/system pages, for example SandBox and help pages: they can't even read them.

How can I do? -- EricVeirasGalisson 2009-06-29 15:22:00

Looks like you have a problem. The acl on the underlay pages is just #acl -All:write Default (that means it just takes away write rights from the default acl). Your default acl does not allow reading for them, so they can't read. One possible solution: modify acls on underlay pages manually for the most important pages.

How to control who is able to create a user account?

There is no official, supported solution with the current MoinMoin versions (1.5.8), anyone can create an account. Also, you can't protect UserPreferences page, as anyone can add this macro to any page and use it to create a user account. Unofficial solutions:

    user_account_creation_enabled = False
    def __init__(self, siteid):
        DefaultConfig.__init__(self, siteid)
        self.user_form_fields[0] = ('name', _('Name'), "text", "36", '')

The first line disables create interface. The constructor sets name field trail to empty string. The patch does not disable creation but only interface to it, so chmod the data/user directory. You can use this script moin_useradd.py to create accounts. It will be cool if someone improves the tweak to actually disable account creation not only the interface to it, thus chmod tweak will not be required.

   password_checker = lambda req, un, pw: 'Sorry, no account creation or password change possible'

How to use HTTPS with Twisted server

This is not possible with current twisted server, it may easy to do using customized twisted server, based on MoinMoin.server.twistedmoin.

How to setup mail subscription?

Enable mail in your farm or wiki configuration:

    mail_smarthost = 'mail.mydomain.com' # your smtp host
    mail_from = 'My Wiki <noreply@mydomain.com>'

If you need to login with a name and password, setup also mail_login:

    mail_login = "username password"

(!) hint: to test your mail subscription, try to edit a page while you are NOT logged in as yourself, the wiki will not tell you about your changes.

Excluding System Pages from Search Results

There is no easy solution like "Don't search in system pages switch". There are several things you can do:

How to add new interwiki sites?

Add the site to data/intermap.txt.

How to run a wiki without CamelCase

I don't want CamelCase to automatically turn into links in my wiki. How can I disable this behavior?

How to migrate from MediaWiki

I want to migrate my wiki from MediaWiki to MoinMoin (missing the ACLs). I want to import existing pages including the change history. Is there a migration script in existence?

Solution

There is a quick-and-dirty one on MediaWikiConverter, and there is a parser on on ParserMarket (which lacks support for advanced formatting options, though) which could display the pages if you do not want to convert the markup. Unfortunately, I do not know any advanced converter/full-featured solution.

Advantages of running a farm

You just need one server, you just have to care for one installation (which can be upgraded easily), you can easily setup multiple wikis which differ just slightly, you can separate content of one wiki by running multiple farms, etc. pp.

Can apache REMOTE_USER replace moinmoin login?

Yes, you can set MoinMoin to read from the webserver's REMOTE_USER and autocreate accounts accordingly. Just add to your wikiconfig.py :

from MoinMoin.auth.http import HTTPAuth
auth = [HTTPAuth(autocreate=True)]

Older notes (probably can be deleted now) :

I understand that this is essentially the same question as above. I'm running moinmoin version 1.5.2, and would like to rely entirely on server authentication to control access. Is it possible to identify users who are not logged in (and have no user profile) using the REMOTE_USER environment variable? Specifically, I'd like the value of this variable to appear in the editor field in the "info" view for each page. Based on various posts on this site, I've included the following in wikiconfig.py:

   1 from MoinMoin.auth import http
   2 from MoinMoin.auth import sslclientcert
   3 
   4 class Config(DefaultConfig):
   5 
   6     user_autocreate = True
   7     auth = [http, sslclientcert]

If this is working, I am unable to see an effect. Can anyone help or refer me to the appropriate documentation?

Update from the OP:

I identified the problem, and the solution may be useful for others. If the above does not work, check the value of the AUTH_TYPE environment variable. I added the following to wikiconfig.py:

   1 from MoinMoin.auth import http
   2 from MoinMoin import user
   3 def uw_auth(request, **kw):
   4     env = request.env
   5 
   6     if env.get('AUTH_TYPE','') == 'UWNetID': # your institution's authentication method here
   7         username = env.get('REMOTE_USER','')
   8         u = user.User(request, auth_username=username,
   9                           auth_method='http', auth_attribs=('name', 'password'))
  10         u.create_or_update()
  11         return u, False
  12     else:
  13         # authentication failed, try the next method
  14         return None, True
  15 
  16 class Config(DefaultConfig):
  17 
  18     user_autocreate = True
  19     auth = [uw_auth, http]

A question for the community: is this an acceptable/safe workaround for a nonstandard server authentication method?

Why is MoinMoin dialling home?

I found that each time I save a page, MoinMoin tries to connect to moinmaster.wikiwikiweb.de. If my firewall blocks this, the save is delayed.

    from MoinMoin.util.antispam import SecurityPolicy

How do I dis/enable FullSearchCached ? (version 1.5.2)

Or is it enabled if I see it in SystemInfo? In MoinMoinRelease1.5/CHANGES it says "Use it if you do not depend on fresh search results but prefer raw speed."

Is it possible to compress my wiki-instance or reduce the version history?

Is there any possibility of either compressing the wiki-instance by eliminating parts of the /revisions-Directory or by decreasing the number of revision history (the default seems to be 100!) or by specifying a certain date to remove all history files which are older than that date?

Having two content areas not parallel but as set and subset

Hello, I’m trying to find a wiki for our institute. I already did some research in the internet but there is one issue, which is not so detailed described as I need it to make a decision which wiki to choose (and I don’t really like the idea of installing and trying with 3 or 4 wikis).

We will need two areas, one which will contain basic information, that is also used by students, and one which contains also actual research topics. As you surely guessed one thing we need is, that students can’t read in the research internals. I know that this can be managed, but I would like researchers to use the basic topics as well and not having these topics twice. So they are not two parallel areas but one is a subset of the other - and here some questions pop up:

- If a researcher is naming a BasicTopic in an article of the research area, will he create a parallel Topic in the research area, also the Topic already exists in the basic area (if he is not using any special link, because he would not know if it exists (or not think about it))?

- I guess it should be no problem to set different (for example) background colours to the template for basic and research. Can the user rights for this pages be also part of the templates or how would one define for a new Topic if it is part of the basic or research area and therefore by whom it can be read?

- can all this be solved by categories?

It would be nice if you could give me a short explanation how this could be solved in your wiki-engine (please as I’m not a programmer be economical with technical terms ;-) Thank you very much in advance, Best regards Oliver

disable spell checking

What is the most clean way to disable spell checking?

Backing Up

What is the recommended way to back up a moinmoin wiki? I have read about WikiBackup but have found this action doesn't work and found references that it is not functional in v 1.5. This way seemed the easiest... I have read the general info on MoinMoinBackup so I know I need to backup the data dir. I also have read about the WikiBackupScript but haven't tried it yet. I currently am backing up by ftp'ing the entire data dir to my computer but this is slow. Recommendations? Info: my wiki is using v 1.5.7 and running on a host with only ftp access. Thanks

Adding Users

Is there a way to programatically add users? I would like to integrate MoinMoin into an existing web site that already has a registration facility, and I can already hear comments from users who will have to effectively register twice. The registration is form based ie not tied to an http authentication or REMOTE_USER. Thanks.

Is it possible to merge 2 wikis?

Is there any way to grab the conents of one wiki, and add it to another wiki?

Moving And Merging MoinMoin Wikis

Using relative URL rather than absolute ones ?

By default, MoinMoin uses absolute URLs. Is it possible to use relative ones instead ? I look a little bit everywhere in the documentation but i didn't find anything about this ( i may have missed it). Anyway i think it's worth a short entry here.

Can we specify different startpages for different groups of people?

We are running a MoinMoin instance since 1 year and a half in a intranet. We are a group of tech-savvy people, each login is in the AdminsGroup. Our MoinMoin instance is now full of interesting knowledge we want to share with other people: I have created logins and a group OtherGroup. The problem is: the actual startpage is organized to have links to useful pages for AdminsGroup and is a place for coordination, we don't want OtherGroup people to use this startpage (not interesting for them, they can't read the pages linked...), how can I change the startpage for some group or someone? Is this only possible? -- EricVeirasGalisson 2008-02-05 15:18:21

Adding new pages via batch script

I have much content in form of text or html that i want to pump into my wiki. But this is nothing i can and will do over a webbroswer - i seek some way to add pages with a script or something like that. Any idea?

How to limit login time / set automatic logout?

To increase safety of the wiki I want to make sure that the wiki logs users out after a certain time. What's the simplest way to do that?

Easy migration

Hi, just today I realize that my recent installed 1.6.2 need to be upgraded to 1.6.3 to fix some serious security issues. The normal solution is to download MM 1.6.3 and make a installation/migration, but I wonder if a simpler solution exists, like applying a patch to my current installation, or tracking my own code with Mercurial or something else... Is there a way to do this? Can I imagine tracking my own MM instances with Mercurial? Do someone have a solution to this problem? Thanks in advance. -- EricVeirasGalisson 2008-04-21 12:53:59

HowTo for SyncJob ?

In moin version 1.6.2/3 I have tried to setup a SyncJob in order to backup my wiki. I have read the page "HelpOnSynchronisation". I have also created a "intermap.txt" file, first in folder moin-1.6.2 later in folder wiki/data.
In both cases I got an IOError: unsupported XML-RPC protocol.
Unfortunately the information for synching a wiki is spread in different files. I would very much appreciate, if someone (Alexander Schremmer would be great) could please give me a hint how to debug the SyncJob action, or write a HowTo.
I already inserted "import pdb/pdb.set_trace()" in file "wikisync.py" line 168 (class MoinRemoteWiki), but it is very difficult for me to figure out (stepping and printing) where the link to the remote wiki is searched for. The variable "wikiurl" did show just a '/'.
Greetings, Rudi 2008-04-22 17:30

HelpOnSynchronisation was actualized some days ago

(!) Please check the remote wiki's wiki config for actions_excluded - the builtin default of it (actions_excluded = ['xmlrpc']) disables xmlrpc (this default was chosen to not open your wiki to automatic read/write access by xmlrpc except if you really decide to want that). To allow xmlrpc (wikisync is based on xmlrpc, so it won't work if you don't allow it), remove 'xmlrpc' from the exclusion list (e.g. actions_excluded = [] if you don't want to exclude any other actions).

(!) You may want to protect your wiki by using ACL rules.

Thank you very much for the quick answer. I already read that, and looked in wikiconfig.py and moin.py and did not found any "action_excluded" statement.
Greetings, Rudi 2008-04-23 18:07

The "xmlrpc" (Remote Procedure Call) for the SyncJob can be enabled in "wikiconfig.py".

actions_excluded = multiconfig.DefaultConfig.actions_excluded[:]
actions_excluded.remove('xmlrpc')

You should have defined also a good acl_rights_default on your wiki. ReimarBauer/Photo/img.png -- ReimarBauer 2010-12-18 07:22:24

-- RudolfReuter 2010-12-17 22:17:56

Is it possible to use dynamic mail configuration?

I would like to configure email support to use the current user's login and password for the mail_from and mail_login entries in the wikiconfig. Goal is, when a user changes a page, the subscription eMail is sent from that user's account (which is identical to the username in my environment). Is that possible? Supplying a default user/pw is not possible (unsafe).

'Unsafe' means, I do not want to write my personal login into the config file, and the Mail Administrator in my big company (big meaning very big and very complicated) will definitly not provide me with a dummy address as you proposed - he will probably kill me for asking :-)

You could change the code rather easily to use the editors mail address as from: address, but you can't easily get his password (we only store a password hash, no cleartext password). But as long as the destination address doesn't require relaying (because the target mailserver is the destination domain's mailserver), the mailserver would likely accept the mail even from an unauthenticated connection.

How to get rid of the thank you message after editting

Whenever you edit something, you would get a thank you message for editting the page (or creating it.) Now, if you navigate to a new page, and press back, you will get an error. I figured the error is caused by the "thank you" message (because the #preview is append to the end of the page's name).

Is there a way to get rid of this error? If not, is there a way to get rid of the thank you message? Thanks -- 12.109.151.100 2008-07-31 18:44:59

Don't go back by the browsers button use the navigation of the theme

How to add additional icon to icon toolbar when editting by GUI

I want to put the @_SIG_@ variable as a clickable icon on the icon toolbar when editing by GUI. Is there a way to do so? Thanks -- 12.109.151.100 2008-07-31 18:49:00

That needs a modification in fckeditor javascript code.

Adding search engine to an external html page

Hi, I was wondering if there's a way to include the MoinMoin search engine for my wiki onto an external webpage that's written in HTML. I want to be able to put the search engine on the external page, which is not part of the Wiki, and have the engine search my Wiki only. Is this possible? Thanks -- 12.109.151.100 2008-07-31 20:24:20

You could add the searh dialog form to your external webpage.

Trivial change flag not visible

We are using just starting to use Moin Ver. 1.8.2 but the Trivial change flag does not appear when we edit. I can't find anything that indicates that this is a configurable option. How do we make it available ?

Correct- e-mail not configured yet. Thanks Gerry

Page name translation for multiple languages

The documentation says:
A page name is translated only if the wiki knows about the language, the wiki translation contain a translation for the name, and a page with that translation exists. If any of this is false, the original name will be displayed.
So using 1.8.2 I have installed Italian, created an ItalianDict page and created two pages TestPage and PaginaProva. I can see that Italian is installed because all the standard messages are in Italian as are the navigation bar tabs. Further the <<GetVal(ItalianDict, TestPage)>> returns PaginaProva so the dictionary is working fine.
So therefore after changing my language to Italian, I presume that my TestPage link should now be shown as PaginaProva, and that when I navigate to it, I should navigate to PaginaProva, which should be the displayed name on the navigation bar tab. Unfortunately it all remains as it does in the English version. I supose this is some misunderstanding by me. Any suggestions ? -- GerardODriscoll 2009-05-21 15:43:56

No response to my query above. Has anyone implemented a multiple language site using MoinMoin ? -- GerardODriscoll 2009-08-24 11:41:10

It won't magically change links in your content. There is special code that does this for navibar and front page. -- ThomasWaldmann 2009-08-24 11:50:51

Managing users in groups

Im writing an authentication (auth) against an external MySql database. I need to manage the ACL rights of wiki users and i have decided to manage this through groups. The group(s) that users belong to are maintained in the external database. Is there a way of automatically maintaining groups in moinmoin? I dont want to maintain groups by hand as there are too many users, and users move between groups.

In the MoinMoin 1.9 groups code was refactored and now it is possible to write backends for groups. See Groups2009 for more details.

ConfigLazyGroups is an example how such a backend can be implemented. You should subclass LazyGroupsBackend and overwrite needed methosd (see ConfigLazyGroups).

Also, there is a patch for a LDAP backend -- DmitrijsMilajevs

Is 'url_mapping' the right way to handle changing drive-Letters (G:, H:, I:) of a standalone-wiki on usb-stick?

Hello, and thanks for the perfect job, i'm using and loving MoinMoin as Desktop-Version for years now under Kubuntu 10.04.
Now, that we're beginning to use Confluence at work, some are astonished, how powerfull MoinMoin is even in comparison to Confluence.

Thanks in advance

I guess that solves it

MoinMoin/script/moin.py ... maint cleancache

MoinMoin/script/moin.py ... maint makecache

see HelpOnMoinCommand ReimarBauer/Photo/img.png -- ReimarBauer 2011-09-21 14:09:17

-- EMuede (Ewald Müller) 2011-09-21 14:00:00

Thanks for reply,

I think, the problem is a bit more complex and is not solved by renewing the cache:

On many places in the wiki i used external links f.e. to 'G:\Offline_kopie\blah\dingens.txt' as an absolute adress. I don't use relative references 'cause they are too 'far away' from the wiki-subdirectories.

If the stick lands on drive-letter 'I:' i have to manually change all the links, therfore i wanted to use a system-variable ?home_drive? or an {url_mapping} instead.

Read about InterWikiMap. You can use that for any kind of links. Then you have only one place where you need to change it. A page can also be updated by a cli script.

There is also a second advantage: The Wiki can be hold small (for backup, maintenance) and serves only as a a comfortable index to the greater amount of external stored data. The whole external Datastructure is -for security- stored a second time on a share, so i could switch to that strukture by using the {url_mapping} ?

May be you are also interested in https://utils.icg.kfa-juelich.de/docs/wiki-xmlrpc-extensions/0.2/wiki-xmlrpc-extensions/ForkWikiContent.html

Very interesting tool! I solved this problem by copying the whole wiki-content from stick to harddrive and used FileSync to synchronize them. I could switch the wikiserver.py (from G: or D: f.e.) in PortablePython depending on the wiki (or copy), i want to use. I'm not used to program in python (though i had >10yr. PL/I-Experience), maybe i would only need one changed system-variable (like mentioned above) to redirect the links?

-- EMuede (Ewald Müller) 2011-09-21 20:00:00

As I mentioned already read about InterWiki. If you define links like 1938 then for those links you need only to change the InterWikiMap page. But this only partly solves your problem. The cache files are dependent to the python version used. So on a different python you need to invalidate them.

How to sort users by account creation date as it was in earlier versions?

Just upgraded from 1.8.4 to 1.9.7 and discovered that the sysadm=users action (that calls do_user_browser in userform/admin.py) now return the alphabetically sorted list of users. In earlier MoinMoin versions the table was sorted by the user account creation date. As the wiki admin in our company I visit this page very often in order to check for new users and give them appropriate permissions. Now it is an impossible task. Right now I'm digging into the sources in order to revert this behavior, but with no success so far. Maybe someone (especially the MoinMoin developers ;) ) has a solution? -- AlexanderAgibalov 2013-10-19 10:56:15

Patch to add a creation time column and sort in descending order.

diff -r 4becc0df2e5f MoinMoin/userform/admin.py
--- a/MoinMoin/userform/admin.py        Thu Oct 17 12:02:46 2013 -0700
+++ b/MoinMoin/userform/admin.py        Sat Oct 19 10:29:25 2013 -0700
@@ -10,6 +10,7 @@
 """


+import time
 from MoinMoin import user, wikiutil
 from MoinMoin.util.dataset import TupleDataset, Column
 from MoinMoin.Page import Page
@@ -26,6 +27,7 @@
     data.columns = [
         Column('name', label=_('Username')),
         Column('groups', label=_('Member of Groups')),
+        Column('creation', label=_('Creation Time')),
         Column('email', label=_('Email')),
         Column('jabber', label=_('Jabber')),
         Column('action', label=_('Action')),
@@ -45,11 +47,12 @@
         # not sure if we can keep lots of User objects instantiated
         # in parallel (open files? too big?)
         u = user.User(request, uid)
-        accounts.append(UserAccount(name=u.name, email=u.email, jid=u.jid, disabled=u.disabled))
+        creation = '.'.join(uid.split('.')[:2])
+        accounts.append(UserAccount(name=u.name, email=u.email, creation=creation, jid=u.jid, disabled=u.disabled))

     def sortkey(account):
-        # enabled accounts at top, sorted by name
-        return (account.disabled, account.name)
+        # sorted by creation time in descending order
+        return (-float(account.creation))

     # Iterate over user accounts
     for account in sorted(accounts, key=sortkey):
@@ -114,6 +117,7 @@
         data.addRow((
             (request.formatter.rawHTML(namelink), account.name),
             request.formatter.rawHTML(grouppage_links),
+            time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(float(account.creation))),
             email_link,
             jabber_link,
             recoverpass_link + enable_disable_link

Works great! Thanks a lot!!! -- AlexanderAgibalov 2013-10-21 06:17:38

Is it possible to log the offending ip with LDAPAuth

I enabled logging on my MoinMoin installation and configured LDAPAuth. I get this in moin.log:

2014-05-05 11:59:24,087 MoinMoin.auth.ldap_login:245 invalid credentials (wrong password?) for dn 'uid=USERNAME,ou=UNIT,dc=EXAMPLE,dc
=ORG' (username: u'USERNAME')

I replaced the real values with USERNAME/UNIT/EXAMPLE/ORG...
Is it possible to add 'remote_addr' to this, like in event-log? I tried to do it myself in ldap_login.py but failed... :(

-- holzkaefer 2014-05-05 13:57:00

Supplementation pages for all pages does not work

I added  supplementation_page = True  # default is False  to my wikiconfig.py, but I do not get any discussion pages, neither for existing nor for new pages.

If I add  #pragma supplementation-page on  to a certain page, I do get a discussion page. So, in principle the supplementation pages seem to work.

I use version 1.9.7.

-- FranSin 2024-03-29 14:21:17


CategoryDiscussion

MoinMoin: MoinMoinQuestions/Administration (last edited 2015-12-08 14:22:38 by erina)