[Vtigercrm-developers] Error to delete lists Vtiger 7.3 (06/2021)
Henry Cumbicus Rivera
hcumbicusr at gmail.com
Thu Jun 10 19:12:11 GMT 2021
Well, in the environment where I had the problem, I already did the
correction for || by && and now it works fine.
It would be nice if they add it to the version 7.3 patches and also to the
next version.
El jue, 10 jun 2021 a las 13:55, Alan Lord (<alanslists at gmail.com>)
escribió:
> I think just replacing the || with && is sufficient.
>
> Al
>
>
> On 10/06/2021 17:18, Rubén A. Estrada Orozco wrote:
> > Alan, I also had a hard time trying to figure it out. Part of the job of
> > a good developer is to create expressive code (not just code that works,
> > which is half the job at most, but code that can be easily understood
> > and maintained).
> >
> > With that goal in mind and using De Morgan as you propose, I would
> suggest:
> >
> > $viewBelongsToCurrentUser = ($customViewOwner == $currentUser->getId());
> >
> > if (!($currentUser->isAdminUser() || $viewBelongsToCurrentUser)) {
> > throw new AppException("PERMISSION_DENIED");
> > }
> >
> > I think the above is more "brain-friendly".
> >
> > Saludos
> >
> > Rubén
> >
> >
> > On Wed, Jun 9, 2021 at 4:44 AM Sukhdev Mohan <s.mohan at myti.it
> > <mailto:s.mohan at myti.it>> wrote:
> >
> > Also to be remembered or statements are shortcutted sonic the first
> > statement is true it'll execute the block. While in an AND it's
> > shortcutted if the first statement is false.
> >
> >
> > Il mer 9 giu 2021, 09:38 Alan Lord <alanslists at gmail.com
> > <mailto:alanslists at gmail.com>> ha scritto:
> >
> > Comparing two not tests often throws me too and it turns out
> > it's even a
> > "thing".
> >
> > https://en.wikipedia.org/wiki/De_Morgan%27s_laws
> > <https://en.wikipedia.org/wiki/De_Morgan%27s_laws>
> >
> > > not (A or B) = not A and not B
> > > not (A and B) = not A or not B.
> >
> > :-D
> >
> > On 09/06/2021 08:25, Alan Lord wrote:
> > > Henry, good catch! It would be good to create a new ticket
> > explaining
> > > this bug and to create a Merge Request with the fix. If you
> > are not
> > > able, let this list know and I am sure one of us can do it on
> > your behalf.
> >
> > _______________________________________________
> > http://www.vtiger.com/ <http://www.vtiger.com/>
> >
> > _______________________________________________
> > http://www.vtiger.com/ <http://www.vtiger.com/>
> >
> >
> > _______________________________________________
> > http://www.vtiger.com/
> >
> _______________________________________________
> http://www.vtiger.com/
--
---------------------------------------------------------------
Henry C.
Tel.: 956727976
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20210610/6ec0de3b/attachment.html>
More information about the vtigercrm-developers
mailing list