Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the project directory permission allowing group to read and execute files #4129

Merged
merged 2 commits into from
Feb 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion apps/dashboard/app/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def save
@directory = Project.dataroot.join(id.to_s).to_s if directory.blank?
@icon = 'fas://cog' if icon.blank?

make_dir && sync_template && store_manifest(:save)
make_dir && update_permission && sync_template && store_manifest(:save)
end

def update(attributes)
Expand Down Expand Up @@ -253,6 +253,14 @@ def make_dir
false
end

def update_permission
project_dataroot.chmod(0750)
true
rescue StandardError => e
errors.add(:save, "Failed to update permissions of the directory: #{e.message}")
false
end

def sync_template
return true if template.blank?

Expand Down