Your problem with the restart is because you configure it in the constructor. 
But this is an Extension which is only created once at startup and not every 
time a check is performed.
So you will need to fill the projectTypes list in the filter method (and don't 
make it a class field).
You might also consider of storing the list in LockProject class (as transient 
field) and just use it in the filter. In LockProject you need a to fill the 
list in the configure method and you need to ensure it is filled when loaded 
(overwrite load method probably).


From: [email protected] <[email protected]> On Behalf 
Of DuMaM
Sent: Freitag, 22. März 2024 11:12
To: Jenkins Developers <[email protected]>
Subject: New plugin

You don't often get email from 
[email protected]<mailto:[email protected]>. Learn why this is 
important<https://aka.ms/LearnAboutSenderIdentification>
Hi,

I'm looking for some answers to questions which pop out during plugin 
development.
https://github.com/DuMaM/lock-project-plugin

My work environment requires from me to give users privileges to create new 
jobs, but I need to lock creation of non pipeline jobs.
I could take a solution proposed a long time ago by Daniel Beck, but I fought 
that maybe it's a good place for a more universal plugin for that purpose, so I 
tweaked his code a bit.

Now i have a functional plugin which can block creation of any job type. It 
still requires some work but i kind of suck on one issue.

I don't understand why it always requires a restart to apply changes from 
system config.
Could somebody step in and help me here?

I'm also seeking information about:
* ways of testing Jenkins plugins - I wasn't able to find a detailed 
documentation
* process how i can introduce it to jenkinsci org

Thanks
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/61bdadc2-c276-4a72-a0a0-d4017bbdc023n%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-dev/61bdadc2-c276-4a72-a0a0-d4017bbdc023n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/AS1PR02MB78470BDE491EABA79178CEC787312%40AS1PR02MB7847.eurprd02.prod.outlook.com.

Reply via email to