You are allowed to work in Finland as an international student. If your work is related to your degree you can work without any restrictions during the academic year. If your work is not related to your studies you are allowed to work during the academic year but only for an average of 25 hours per week during the academic terms.
The number of working hours is not restricted on a weekly level. This means that you can adjust your weekly working hours during the academic term, as long as you work for 25 hours a week on average.
When your educational institution does not offer any education you can work without any restrictions. This means that between June and August you can work without any restrictions irrespective if your work is related to your studies or not.
More information about studying and working in Finland at the Finnish Immigration Service.