| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This removes some 'u' prefixes and converts simple format() calls to f-strings.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a new Comment link table that is used to link between some
object and then the comment object, which can be more or less any
object in Mediagoblin. The MediaComment has been renamed to
TextComment as that more aptly describes what it is. There is
migrations for these changes.
There is also the conslidation of the Report tables into a single
Report table, the same with the Notification objects. This is because
both of them split out MediaEntry and Comment versions into their own
polymorphic versions from a base, this is no longer a meaningful
distinction as comments can be anything.
|
|
|
|
|
|
|
| |
- Adds a "type" column to the Collection object and allows the
CollectionItem model to contain any object.
- Changes "items" to "num_items" as per TODO
- Renames "uploader", "creator" and "user" to a common "actor" in most places
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a lot of the issues with the LocalUser changes that were
merged recently. There was a problem where the attributes of LocalUser
were not being eagerly loaded and because the Session was detached an
exception was being raised when they were accessed.
This also fixes some typo's which were introduced.
Finally this adds a temporary fix for a potential SQLAlchemy bug, this
is a bug where doing:
User.query.filter(LocalUser.username == "some_username").first()
does NOT yeild a user with the username "some_username" but all users
on the site. The temp fix is to just query the LocalUser, this should
be resolved when bug is confirmed and fixed upstream.
|
|
|
|
|
|
|
| |
The code base had many references to User.username and other
specific to LocalUser attributes as that was the way it use to exist.
This updates those to query on the generic User model but filtering
by attributes on the LocalUser.
|
|
|
|
| |
I will be switch to use ``from __future__ import unicode_literals`` later.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
paroneayea's request, which was to make to possible to turn off user's ability
to file reports through a mediagoblin.ini setting. Aside from this, I had to
make it possible for the Moderation User Panel to display more than 10 users.
And aside from that, I just had to fix some errors which cropped up with my
most recent additions. I also fixed some tests that were broken because I had
changed the checks for whether or not a user is active. Nearing the end!
===============================================================================
Made it possible to turn off reports through a mediagoblin.ini setting
===============================================================================
--\ mediagoblin.ini
--\ mediagoblin/config_spec.ini
--\ mediagoblin/decorators.py
--\ mediagoblin/moderation/views.py
--\ mediagoblin/templates/mediagoblin/user_pages/media.html
--\ mediagoblin/user_pages/views.py
===============================================================================
Made User Panel capable of showing more than 1 page of users
===============================================================================
--\ mediagoblin/moderation/forms.py
--\ mediagoblin/moderation/views.py
--\ mediagoblin/templates/mediagoblin/moderation/user_panel.html
===============================================================================
Fixed Broken Tests
===============================================================================
--\ mediagoblin/tests/test_notifications.py
--\ mediagoblin/tests/test_openid.py
--\ mediagoblin/tests/test_persona.py
--\ mediagoblin/tests/test_reporting.py
===============================================================================
Fixed errors in code
===============================================================================
--\ mediagoblin/db/migrations.py
--| Set nullable to True for MediaReports' and CommentReports' content foreign
|keys
--\ mediagoblin/db/models.py
--| Got rid of cascading rules for MediaReports' and CommentReports' content
|foreign keys. This makes it possible for the Reports to continue to exist
|after the content is deleted.
--\ mediagoblin/moderation/tools.py
--| Fixed formatting of Report Resolution Methods
--| Took out pieces of code used in debugging
--\ mediagoblin/templates/mediagoblin/base.html
--\ mediagoblin/templates/mediagoblin/moderation/report.html
--| Made reports details page able to tell what is a deleted archived report.
--\ mediagoblin/templates/mediagoblin/moderation/report_panel.html
--\ mediagoblin/templates/mediagoblin/utils/report.html
|
|
|
|
| |
-mendation. Instead, all of its functionality will be in the ReportBase object.
|
|
did a few things. I wrote many many many new tests, either in old test files or
in the three new test files I made. I also did some code-keeping work, deleting
trailing whitespace and deleting vestigial code. Lastly, I fixed the parts of
the code which I realized were broken thru the process of running tests.
===============================================================================
Deleted trailing whitespace:
===============================================================================
--\ mediagoblin/decorators.py
--\ mediagoblin/auth/tools.py
--\ mediagoblin/db/migrations.py
--\ mediagoblin/db/models.py
--\ mediagoblin/gmg_commands/users.py
--\ mediagoblin/moderation/forms.py
--\ mediagoblin/moderation/tools.py
--\ mediagoblin/moderation/views.py
--\ mediagoblin/templates/mediagoblin/moderation/media_panel.html
--\ mediagoblin/templates/mediagoblin/moderation/report.html
--\ mediagoblin/templates/mediagoblin/moderation/report_panel.html
--\ mediagoblin/templates/mediagoblin/moderation/user.html
--\ mediagoblin/templates/mediagoblin/moderation/user_panel.html
--\ mediagoblin/templates/mediagoblin/user_pages/report.html
--\ mediagoblin/templates/mediagoblin/utils/report.html
--\ mediagoblin/user_pages/lib.py
--\ mediagoblin/user_pages/views.py
===============================================================================
Deleted Vestigial Code
===============================================================================
--\ mediagoblin/db/util.py
--\ mediagoblin/tests/test_notifications.py
===============================================================================
Modified the Code:
===============================================================================
--\ mediagoblin/moderation/tools.py
--| Encapsulated the code around giving/taking away privileges into two
| funtions.
--\ mediagoblin/moderation/views.py
--| Imported and used the give/take away privilege functions
--| Replaced 'require_admin_or_moderator_login' with
|'user_has_privilege(u"admin")' for adding/taking away privileges, only
| admins are allowed to do this.
--\ mediagoblin/templates/mediagoblin/banned.html
--| Added relevant translation tags
--| Added ability to display indefinite banning
--\ mediagoblin/templates/mediagoblin/user_pages/media.html
--| Made sure the add comments button was only visible for users with the
| `commenter` privilege
--\ mediagoblin/tests/test_submission.py
--| Paroneayea fixed a DetachedInstanceError I was having with the our_user
| function
--\ mediagoblin/tests/tools.py
--| Added a fixture_add_comment_report function for testing.
--\ mediagoblin/tools/response.py
--| Fixed a minor error where a necessary return statement was missing
--| Fit the code within 80 columns
--\ mediagoblin/user_pages/views.py
--| Added a necessary decorator to ensure that only users with the 'commenter'
| privilege can post comments
===============================================================================
Wrote new tests for an old test file:
===============================================================================
--\ mediagoblin/tests/test_auth.py
--| Added a new test to make sure privilege granting on registration happens
| correctly
--\ mediagoblin/tests/test_modelmethods.py*
--| Added a test to ensure the User method has_privilege works properly
===============================================================================
Wrote entirely new files full of tests:
===============================================================================
--\ mediagoblin/tests/test_moderation.py
--\ mediagoblin/tests/test_privileges.py
--\ mediagoblin/tests/test_reporting.py
===============================================================================
===============================================================================
NOTE: Any files I've marked with a * in this commit report, were actually subm-
itted in my last commit. I made that committ to fix an error I was having, so
they weren't properly documented in that report.
===============================================================================
===============================================================================
|