Description

If you have a page e.g. ReimarBauer subscribed then user.isSubscribedTo knows all belonging subpages.

e.g. ReimarBauer/RecommendedPage

"""
        Check if user subscription matches any page in pagelist.
        
        @param pagelist: list of pages to check for subscription
        @rtype: int
        @return: 1, if user has subscribed any page in pagelist
                 0, if not
"""

I would think it should only return pages the user has subscribed and not all pages dependent on a page the user has subscribed.

At the moment it returns all sub pages of a subsribed page and not only the one the user has subscribed.

I am not sure if it is really a bug or a feature. Because of the choosen name of this routine I think it should be more restrictive as it is now. -- ReimarBauer 2005-10-15 21:06:46

Workaround

Discussion

Description is unclear. Please give exact data how to reproduce with moin distribution code (not 3rd party code).

If I subsribe to the page ReimarBauer and do create a NewPage below this page then this functions returns True for the new one too. Because I haven't subscribed this page ReimarBauer/NewPage this should be False or ?

request.write(str(request.user.isSubscribedTo('ReimarBauer/NewPage')))

It smells like a bug. Are you sure you don't have a regular expression that cause that?

verified to work by testSubscriptionSubPage in test_user.

Plan


CategoryMoinMoinNoBug

MoinMoin: MoinMoinBugs/user.isSubscribedTo (last edited 2009-07-03 12:45:24 by ReimarBauer)