I want to write a program in my symfony1.4 project which can return/give the unsecured page’s url, how can I write this?
I secured the actions with credentials and i used sfDoctrineGuard for security.
If user is not authorized for any pages then that pages show me 401 code from sfwebresponse.
I gave the credentials for every actions.My first question is
- Now how can i test that the actions are secured.
- I want to generate a report which contains the every pages url’s and respective urls are secured or not?
my routing.yml is like follows:
annual_performance_appraisal_details:
class: sfDoctrineRouteCollection
options:
model: AnnualPerformanceAppraisalDetails
module: AnnualPerformanceAppraisalDetails
prefix_path: /AnnualPerformanceAppraisalDetails
column: id
with_wildcard_routes: true
annual_performance_appraisal:
class: sfDoctrineRouteCollection
options:
model: AnnualPerformanceAppraisal
module: AnnualPerformanceAppraisal
prefix_path: /AnnualPerformanceAppraisal
column: id
with_wildcard_routes: true
apa_question_answer:
class: sfDoctrineRouteCollection
options:
model: ApaQuestionAnswer
module: ApaQuestionAnswer
prefix_path: /ApaQuestionAnswer
column: id
with_wildcard_routes: true
In my Second(2) question i want a report like follows:
Url: …../AnnualPerformanceAppraisalDetails
SecurityReport: 401(Athorization requried)
Url: …../AnnualPerformanceAppraisal
SecurityReport: 401(Athorization requried) or 403 Forbidden
About 1 You can check the status code of the pages. You will need an explicit list of urls to test.
You can probably write something like this :
About 2 are you trying to build that report from the tests results?