developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 12 years ago

Closed 9 years ago

#809 closed new feature (fixed)

Generate jACL2 rights with the createdao command

Reported by: mike Owned by:
Priority: high Milestone: Jelix 1.3
Component: jelix-scripts Version: trunk
Severity: minor Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

Description

It would be so great if we could generate ACL2 rights at the same time we create the CRUD! ACL2 rights have to match CRUD methods so we must have these rights :

  • list
  • view
  • create
  • modify
  • delete

And a special one for all others methods not specified in the previous list. I'm writing the patch right now !

Attachments (6)

patch_809_v1.diff (4.5 KB) - added by mike 12 years ago.
It works. This the very first version in order to discuss.
patch_809_v1.1.diff (4.2 KB) - added by mike 12 years ago.
Same patch with minor improvements
patch_809_v1.2.diff (7.3 KB) - added by mike 12 years ago.
add a module listener to generate CRUD menu, events.xml is missing.
patch_809_v1.3.diff (11.4 KB) - added by mike 12 years ago.
A lot of improvements, also create or update events.xml if needed.
patch_809_v1.3.1.diff (11.4 KB) - added by mike 12 years ago.
Last version, correct a typo mistake on -force option
patch_809_v2.diff (14.6 KB) - added by laurentj 10 years ago.

Download all attachments as: .zip

Change History (14)

Changed 12 years ago by mike

It works. This the very first version in order to discuss.

Changed 12 years ago by mike

Same patch with minor improvements

Changed 12 years ago by mike

add a module listener to generate CRUD menu, events.xml is missing.

Changed 12 years ago by mike

A lot of improvements, also create or update events.xml if needed.

Changed 12 years ago by mike

Last version, correct a typo mistake on -force option

comment:1 Changed 12 years ago by mike

For the option "-force" we have to update some commands and methods used by createdacrud. Maybe we have to look further later ?!

comment:2 Changed 12 years ago by laurentj

  • review set to review?

comment:3 follow-up: Changed 11 years ago by laurentj

  • review changed from review? to review-
+ menu.item.crud = CRUD 

I prefer a better readable label, like "Data management" or something like that. For most of users, "CRUD" doesn't mean something.

    public  $allowed_parameters=array('module'=>true, 'table'=>true, 'ctrlname'=>false, 'acl2'=>false);

I don't know why you added the acl2 parameter, since you don't use it in the command.

$options['-force'] = ''; 

You give this option to createdao and createform, but these commands don't support it.

Same thing for calls of createFile, it doesn't support a "force" parameter.

Did you missed something in your patch ? Or perhaps you could add this support with an other ticket+patch.

comment:4 in reply to: ↑ 3 Changed 11 years ago by mike

Replying to laurentj:

+ menu.item.crud = CRUD 

I prefer a better readable label, like "Data management" or something like that. For most of users, "CRUD" doesn't mean something.

Yes it's better you're right.

    public  $allowed_parameters=array('module'=>true, 'table'=>true, 'ctrlname'=>false, 'acl2'=>false);

I don't know why you added the acl2 parameter, since you don't use it in the command.

Actually I don't remember, I have to check this.

$options['-force'] = ''; 

You give this option to createdao and createform, but these commands don't support it.

Same thing for calls of createFile, it doesn't support a "force" parameter.

Did you missed something in your patch ? Or perhaps you could add this support with an other ticket+patch.

In fact the "-force" parameter was discussed on IRC, and it's a good solution to overwrite files already created. But I didn't develop anything right now to do this. If you want I can create the ticket and someone can do this later (if it's not me)

comment:5 Changed 11 years ago by laurentj

In fact the "-force" parameter was discussed on IRC, and it's a good solution to overwrite files already created.

Yes I agree, it can be useful. But don't provide an uncomplete implementation here :-) Remove this parameter in this patch, and fill a new ticket to bring the support of -force on some commands.

comment:6 Changed 11 years ago by laurentj

  • Milestone changed from Jelix 1.2 beta to Jelix 1.2

any news ?

Changed 10 years ago by laurentj

comment:7 Changed 10 years ago by laurentj

  • Milestone changed from Jelix 1.2 to Jelix 1.3
  • Priority changed from normal to high
  • review review- deleted

Here is an improvement of the patch. However, I'm not sure all is perfect. And it needs to be tested. Too late for 1.2.

comment:8 Changed 9 years ago by laurentj

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.