Merv

Permission Denied for Authors with Upload Priviledges

Vote 0 Votes

Upgraded to MT 4.35 from MT 4.32 and Authors with Upload File privileged could not upload assets for Create Entry. Found the following code in Asset.pm at line 112:


return $app->errtrans("Permission denied.")
unless $app->user->is_superuser
|| (
$perms
&& $perms->can_edit_assets
);

Went back to Asset.pm in MT 4,32 and found this extended logic covering Upload conditions and placed in MT 4.35 version and it now works:

return $app->errtrans("Permission denied.")
unless $app->user->is_superuser
|| (
$perms
&& ( $perms->can_edit_assets
|| $perms->can_edit_all_posts
|| $perms->can_create_post )
);

Could not find mention of this anywhere in the Forum so posting it to help others save some time and frustration.

Reported on Movable Type 4.3

4 Replies

| Add a Reply
  • Thanks for the news, Merv. We may be upgrading to 4.35 shortly, you saved me a "What the....?" if it turns up.

    • "if it turns up" ...

      It will if you have Authors with Role privileges "Upload File" without "Manage Assets".

      Manage Assets gets checked in Asset.pm as "can_edit_assets"

      Upload Files must have an internal privilege code but I don't know what it is (didn't have the time to look for it).

      But, in my case, Author Roles that can "Create Entries" also have the privilege "Upload Files" so the MT 4.32 code works for me. I don't want my Authors to be able to manage all assets.

      Maybe the Forum admins can shed some light on this. I also submitted it to MTOS DEV.

  • What prompted you to upgrade to 3.5? I'm trying to decide where to land next.

  • Many bug fixes, security fixes and capability. I also use the MT Pro/Community addons and have custom interfaces to private areas that work.

    Obviously I'm finding new differences as in the Roles and the impact.

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

1774 6167

Last Topic: Template modules by Zielun on Feb 16, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1434 5088

Last Topic: Maintenance announcement by Nick on Feb 17, 2012

695 2912

Last Topic: Insert Image / File Fails by Russ Miller on Feb 10, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

174 740

Last Topic: Captcha images rendering slowly by ScottM on Feb 12, 2012

190 568

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

222 720

Last Topic: Custom Field for Asset Not Appearing by android on Feb 9, 2012