Michael Posted September 29, 2009 Share Posted September 29, 2009 I think my request is going to be pretty simple, so please bear with the lengthy explanation. I have been working on an application that is trying to utilize the classPost.php file for creating topics, creating replies, and editing posts. It is convenient in that I can set just a few flags and have it do the work for me, but it seems to be a big pain to use it as a real API. The code is littered with all kinds of permission checks that stop me from doing these functions. For example, I'm trying to create a tool that will loop through a series of forum topics and rebuild the content of their first post. I am able to set the content, tell who the author was, what topic ID it was and all that, but the problem is that it's checking to see if the 'author' has edit permissions. The author of the post in question may not, they may even be a guest. But I need my tool, which resides in the ACP, to not check those permissions; just frickin' edit the post already. :P I've already reported one problem with this file and how it forces the 'author' to have 'start topic' permissions in order to create a new topic, here, but that's flagged for a future version, and I fear that future version that it may be considered for is months away, if it will be added at all. This issue I'm running into now is similar, but I haven't been able to hack a workaround for it yet. My request is simple: please add some flag to that file, false by default, that when set to true it bypasses these checks which don't make any sense when the class is being used as an API. I want to be able to use this class to just make new topics, posts, and edits without having to jump through hoops, and I really don't want to have to re-write all of the code without these checks and use it in my application instead. Link to comment Share on other sites More sharing options...
Management Matt Posted September 29, 2009 Management Share Posted September 29, 2009 A reasonable request. I'll add it in for 3.0.4. Link to comment Share on other sites More sharing options...
Michael Posted September 29, 2009 Author Share Posted September 29, 2009 Huzzah! Link to comment Share on other sites More sharing options...
bfarber Posted September 29, 2009 Share Posted September 29, 2009 Woohoo. Link to comment Share on other sites More sharing options...
rct2·com Posted September 29, 2009 Share Posted September 29, 2009 [quote name='Μichael' date='29 September 2009 - 07:22 PM' timestamp='1254248552' post='1862126'] Huzzah! [/quote] [quote name='bfarber' date='29 September 2009 - 08:36 PM' timestamp='1254252969' post='1862145'] Woohoo. [img]http://community.invisionpower.com/public/style_emoticons/default/whistle.png[/img] [/quote] "Talk like a Pirate Day" was last week. Link to comment Share on other sites More sharing options...
Management Matt Posted September 30, 2009 Management Share Posted September 30, 2009 Ok, that's done. From 3.0.4 you can use: $postClass->setBypassPermissionCheck( true ); And it will not bother you with user based permission errors. It still ensures you sent across a proper user and that the forum is capable of receiving a topic/reply/edit. Link to comment Share on other sites More sharing options...
Michael Posted September 30, 2009 Author Share Posted September 30, 2009 Good news, thanks Matt! I'll test this out as soon as I get my hands on 3.0.4. :) Link to comment Share on other sites More sharing options...
Management Matt Posted October 1, 2009 Management Share Posted October 1, 2009 I only did this because you like Radiohead, by the way. If your favourite band was the "cheeky girls", I would not have done it and furthermore, I would have changed all method functions to private just to be spiteful. Link to comment Share on other sites More sharing options...
Michael Posted October 1, 2009 Author Share Posted October 1, 2009 I knew my blatant pandering to your fondness for Radiohead would pay off. :) :frantics: Link to comment Share on other sites More sharing options...
IP.iBaLLiN Posted October 2, 2009 Share Posted October 2, 2009 Even though I have no idea what this coding talk means, I just laughed at the convo. :P Link to comment Share on other sites More sharing options...
rct2·com Posted October 3, 2009 Share Posted October 3, 2009 [quote name='Μichael' date='01 October 2009 - 01:43 PM' timestamp='1254401038' post='1862630'] I knew my blatant pandering to your fondness for Radiohead would pay off. :) :frantics: What are you going to offer me to stop me telling Matt that Pink Floyd are really your favourites? Link to comment Share on other sites More sharing options...
.Ian Posted October 3, 2009 Share Posted October 3, 2009 [quote name='Matt' date='01 October 2009 - 01:41 PM' timestamp='1254400915' post='1862629'] I only did this because you like Radiohead, by the way. If your favourite band was the "cheeky girls", I would not have done it and furthermore, I would have changed all method functions to private just to be spiteful. Quick Michael - put in all your other requests ;) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.