Closed Pa3u3u closed 9 years ago
what method?
Sorry, I did not see your message. I had mapping for 403 error page in AuthController. You have added it for a bit different mapping to ErrorController. So i removed it from AuthController, as now it makes more sense in ErrorController.
I have also noticed that Chrome + IE have different value for locale than Firefox, so we need to change comparisons for deciding what template to include to this:
${pageContext.request.locale == 'cs' || pageContext.request.locale == 'cs_CZ'}
That works in all 3 browsers.
Dammit ... ok, I will change it when I finish examples (20 Excursions, 7 Trips, so far 7 Customers) ... enough? :D
I think it is enough, but if you are enjoying yourself, then by all means, keep it on coming :D:D
Did you change some of *.jsp files?
Also, can you czech the check version of those error pages? ( :wink: )
In my last commit I have changed index.jsp and account/form.jsp.
Sure, I can look at the translations.
:D:D You have added Wherever the wind takes me. I forgot to ask you to that, but obviously I did not have to.
I have also just tested authentication for REST. Works great, nice job! I wonder how many other teams will have authentication there ;)
But I have forgot to add the discount tours to Alpha Centauri Bb :smiley: And I have found another error (the condition when to disable Trips' delete button is inversed), so I will fix both
I found only minor mistakes. Can I correct them directly? It would be easier.
Should I also add the conditions to error pages for checking for "cs_CZ" locale?
EDIT: "iPad owners only" :D:D That makes me proud to own an Android tablet.
Well, I found more compact condition:
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:when test="${fn:startsWith(pageContext.response.locale, 'cs')}"> ... </c:when>
which works for any cs_CZ
or cs_CZ.utf8
etc., but it does not matter, if you fixed it already
Alright, I can use that. I knew there will be something to check the prefix but i was too lazy to look for that :D
I will push it along with grammar corrections.
Ok, it is done.
Ad "iPad owners only": Did you notice the price? :smiley:
Also, it is quite strange that you can login into REST API as an USER and delete trips and excursions... :smiley:
... and the reason is that certain team leader is a moron and forgot to add @Secured
annotations on Service layer.
I did notice price. And the travel guide on that excursion should be called Bender. It relates to iPhones, but what the hell.. :smiley:
:smiley: Ok, so, what's left?
I think we are done. All requirements are met. Maybe we can do final check, if everything works (click it through) and try clean build (repo checkout and build?). I have also seen some commented out code in JPAAccountDAOTest. Does anything else come in mind?
I will add my slides with my assesment of this subject tomorow, as tomorow I will be studying for java exam so I will do it both.
Btw I have just read requirements again and I think that deadline was an hour ago :D But hopefully it won't be as strict as previous checkpoints that had explicit date and time.
Oh and readme should be updated about CLI auth. I think that just copying your entry from auth issue shoud do.
Yes, I noticed it too... well, we can argue that we didn't know the precise time of the deadline, since we got the exact time only on friday... but meeh. We have 40 points, what can go wrong? :smiley:
All right, let's make it faster, you check the Dao, Service and API (also documentation!), I will check the rest (Web, CLI). And I will update the Readme as well.
Okay.
I have noticed a very odd thing:
CRLF
line endigs, some only LF
,EOL
sequence,While these are not problems (well, the second one actually is, because a text file must end with EOL by definition), I have a script at work that can fix this all at once ... I think I may run it after we check the code :smiley:
One more thing: when you are done, you can recheck warnings automatically in NetBeans:
You can ignore all "Missing Javadoc", but for instance, in AccountDTO there is a warning about redundant if statement.
Will do. I will commit per module to avoid one giant commit blob.
:scream: how many changes did you do?
Well it is mostly code formatting and comment typos changes, but in some tests I had to remove quite a lot of unused variables :)
And I have that checking under Source > Inspect :)
Oooo ... yes, sorry, it's under Source here in LinuxLand as well, I'm just too tired to think properly right now :smiley:
I've finished CLI and Web (there were not too many problems), so I will fix that warning and check API as well.
I have just pushed DAO. Ok, I will do Service and leave API to you.
Overriden methods for Default_Service have documentation, although they are documented in their interfaces in API. Shoud I remove docs from Service?
Mmm ... we created them copy-paste I remember :smiley: well, it's not a mistake to have documentation on @Override
methods, so I will leave it up to you.
That is odd, I have commited DefaultReservationService and AccountServiceTest and whenever I try to push I get notified there is conflict. Odd..
which file is conflicting? O_o try pull
first (Git will not allow you to push
if your have a staged commit, but master is ahead).
When I try pull it also says that conflict would arise.
How can I revert my local commit (not pushed)? Git > Remote > Show Outgoing > Revert Commit?
I dont want to fuck anything up.
Yeah, incomming show your changes in API so it is just that master is one commit ahead. If I push it, it should merge correctly, no? It is in separate modules.
but which file would be in conflict? O_o doesn't it say? Reverting a commit WILL be a problem, mmm, make backup of the Service layer somewhere, then revert it, pull, and copy your changed files back
(If you were using command-line GIT, I think it would be easier, as it usually precisely shows you where's the problem and how to fix it :smiley:
It does not say which file. And there should not be any, you have changed API and I have changes in Service. Funny bussiness. I will try to revert my local commit, hopefully it will not revert stuff you have pushed to API.
We can still revert the revert :smiley:
Well that commit chain is weird like a motherfucker, but I somehow got it there. Almost not worth the effort, since I did not change almost anything.
There's no conflict :smiley: I think it was the NetBeans' Git client wrongly interpreting what I said (the underlying Git will not allow you to push if there's a new commit in the master).
Ok, so now you will run that magic script to fix wrong EOL etc and change readme and we are done, I suppose?
Almost. I randomly tried something and realized that when you remove your account, the customer remains for some reason :smiley:
Whatever, lets keep it for "accounting" reasons :D Nice little economy feature.
I see why. The "CustomerService.deleteById" is secured for admins only
I will make it "for users only when ID's match or admins" :smiley:
Oh, I have automatically set everything for Customers for admins only except for creating (cause of reservations). At that time I did not know we will be removing accounts and after it was decided, I must have forgotten to change it. Sry.
But removing customer during removal of account might scream, if there are reservations for that customer. You would need to remove probably those first.
I know, the original code even know about it :smiley: it failed in the last step, when removing the customer
Ok, fuck it, I can't delete customer that is referenced by account and I can't delete account that is referenced by customer. I would have to override some service methods, that I don't have time for. So, the customer will remain :smiley:
I said it before, lets label it economy and accounting feature :-) Removing account keeps customers for checking of... whatever needs to be checked. History of reservations or sth :smiley:
You can see the list here
After [FIXD]
, the list of 3 chars contains what was fixed:
e
- missing EOL
at the end of filec
- CRLF
instead of LF
w
- whitespaces at the end of lineBtw, the command was
./fixsrc.pl --all --ignore-path "./.git" --ignore-path "lib" --ignore-file "*.png" --ignore-file "*.gif" -v -v --level 3 --color=always > ~/fixsrc.log
I never though I'd actually use this script outside of work :smiley: I'm just going to test it didn't do anything wrong
The list of things that should be done at some point in time but are not essential, just polishing:
/403
would be nice,/403
?STAFF
and if there are excursions that cannot be deleted,logout
or generally somewhere on main page there should be links to delete and edit the account (currently there is no way forUSER|STAFF
to do that except directly typing/accounts/edit/<my_id>
)You are welcome to propose your own ideas.