[FIXED] Wrong permission check?

More
11 years 4 months ago #49480 by jrodgar
Replied by jrodgar on topic Wrong permission check?
Anyway, the original bug is still on 1955. I have it hotfixed on local in the way I explain below, but I´m not sure if there is something I´m not taking into account

jrodgar wrote: Ok, here is the deal

code.google.com/p/flexicontent/ ... m.php#1288

That check is giving me problems, looks like is not checking properly that is empty when an object is being passed (see this stackoverflow.com/questions/9412 ... pty-in-php )

In my case, the problem appeared when a user, that have edit state permissions on the category item, tries to save the change state from "pending approval" to "published"


So the stack would be

items.php:save()

parentclassitem.php:getForm()( code.google.com/p/flexicontent/ ... em.php#971 )

parentclassitem.php:canEditState()


For example, when I change the problematic line ( code.google.com/p/flexicontent/ ... m.php#1288 ) with

tmpItem = (array)$item;
if ( empty($item) || empty($tmpItem))


It saves correctly (it seems correctly)



What do you think?

By the way:
PHP 5.4.31
Flexicontent 2.2.0 r1910
Joomla 3.2.4


Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #49565 by jrodgar
Replied by jrodgar on topic Wrong permission check?
Not fixed on 1967

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #49580 by ggppdk
Replied by ggppdk on topic Wrong permission check?
Hello

i need to replicate/confirm this before i will fix or change anything,

e.g instead of making a fix at point that you suggest the fix could be in the place that the function is being called

you do well to remind, just please update your forum signature ;)


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #49591 by jrodgar
Replied by jrodgar on topic Wrong permission check?
Yeah, no problem, glad to help ;) I understand that my fix maybe is not fixing the issue properly, but just hotfixing :P

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

More
11 years 1 month ago #51542 by jrodgar
Replied by jrodgar on topic Wrong permission check?
Friendly bump

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago #63155 by jrodgar
Replied by jrodgar on topic Wrong permission check?
Info for future visitors.

This was already corrected on github.com/FLEXIcontent/flexicontent-cck...a7eae5107382d8abdf92 , from version 3.0.14-rc2a and above

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago #63170 by ggppdk
Replied by ggppdk on topic Wrong permission check?
Hello

please note that permission saving in J3.6.0
- for types
- for fields

will only work with v3.0.15-rc / v3.0.15 final
github.com/FLEXIcontent/flexicontent-cck/releases


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save